1.GitHub验证申请:
https://github.com/settings/apps/new
教程(第三方登陆auth(github)_github auth-CSDN博客)https://www.ruanyifeng.com/blog/2019/04/github-oauth.html
git clone https://github.com/supabase-community/postgres-new.git
3..env.example改为.env
SUPABASE_AUTH_GITHUB_CLIENT_ID=Iv23linqH7
SUPABASE_AUTH_GITHUB_SECRET=2b41e6ae04d0445a
SUPABASE_AUTH_GITHUB_REDIRECT_URI=http://localhost:54321/auth/v1/callback
4.数据库配置
cd ./postgres-new/apps/db-service
npm run generate:certs
sudo npm install pg-gateway@^0.2.5-alpha.2
npm run dev
psql "host=localhost port=5432 user=postgres"
psql "host=localhost port=5432 user=postgres password=postgres"
5.启动项目
cd ./postgres-new/apps/postgres-new npm i npx supabase start npx supabase status -o env \ --override-name api.url=NEXT_PUBLIC_SUPABASE_URL \ --override-name auth.anon_key=NEXT_PUBLIC_SUPABASE_ANON_KEY | grep NEXT_PUBLIC >> .env.local echo 'OPENAI_API_KEY="<openai-api-key>"' >> .env.local npm run dev