chore: 配置数据库和依赖
This commit is contained in:
@@ -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,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!,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -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:"
|
||||
},
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user