SuperAPI AI 工具集

astro-supabase-netlify

前端与建站

查看项目

更新于 10-16 02:01

技能介绍

用途

Astro + Supabase(Netlify)是一个起步模板,用于快速搭建基于 Astro 框架并集成 Supabase 的项目,目标部署平台为 Netlify。

技术栈

  • 框架:Astro
  • 数据库:Supabase
  • 包管理器:npm

前置条件

  • 需要一个 Supabase 项目。

使用方式

1. 克隆模板

git clone --depth 1 https://github.com/netlify-templates/astro-supabase-starter.git .

如果目录不为空:

git clone --depth 1 https://github.com/netlify-templates/astro-supabase-starter.git _temp_template mv _temp_template/* _temp_template/.* . 2>/dev/null || true rm -rf _temp_template

2. 移除 Git 历史(可选)

rm -rf .git git init

3. 安装依赖

npm install

4. 设置环境

在 .env 中配置 Supabase 凭据。

构建

npm run build

部署到 Netlify

netlify deploy --prod

开发

npm run dev

适用场景与限制

该模板适用于需要 Astro 前端框架、Supabase 数据库并计划部署到 Netlify 的项目。关于收费、价格、平台支持范围、具体效果等更多信息,资料暂未提供。