chore: 配置数据库和依赖

This commit is contained in:
2026-03-30 21:26:10 +08:00
parent a510c62398
commit da3ce1d2dd
6 changed files with 148 additions and 81 deletions
+3 -1
View File
@@ -1 +1,3 @@
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/kairos
BETTER_AUTH_SECRET=your-secret-key-at-least-32-chars
BETTER_AUTH_URL=http://localhost:3000
+1 -2
View File
@@ -1,11 +1,10 @@
import { defineConfig } from 'drizzle-kit'
import { env } from '@/env'
export default defineConfig({
out: './drizzle',
schema: './src/server/db/schema/index.ts',
dialect: 'postgresql',
dbCredentials: {
url: env.DATABASE_URL,
url: process.env.DATABASE_URL!,
},
})
+4
View File
@@ -38,6 +38,10 @@
"postgres": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"@dnd-kit/dom": "catalog:",
"@dnd-kit/react": "catalog:",
"better-auth": "catalog:",
"lucide-react": "catalog:",
"uuid": "catalog:",
"zod": "catalog:"
},
+2
View File
@@ -4,6 +4,8 @@ import { z } from 'zod'
export const env = createEnv({
server: {
DATABASE_URL: z.url(),
BETTER_AUTH_SECRET: z.string().min(32),
BETTER_AUTH_URL: z.url(),
},
clientPrefix: 'VITE_',
client: {