mirror of
https://github.com/SrIzan10/lofi.git
synced 2026-06-06 00:56:53 +00:00
feat: database and initial better auth install
This commit is contained in:
18
drizzle.config.ts
Normal file
18
drizzle.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { defineConfig } from 'drizzle-kit';
|
||||
|
||||
if (!process.env.CLOUDFLARE_ACCOUNT_ID) throw new Error('CLOUDFLARE_ACCOUNT_ID is not set');
|
||||
if (!process.env.CLOUDFLARE_DATABASE_ID) throw new Error('CLOUDFLARE_DATABASE_ID is not set');
|
||||
if (!process.env.CLOUDFLARE_D1_TOKEN) throw new Error('CLOUDFLARE_D1_TOKEN is not set');
|
||||
|
||||
export default defineConfig({
|
||||
schema: './src/lib/server/db/schema.ts',
|
||||
dialect: 'sqlite',
|
||||
driver: 'd1-http',
|
||||
dbCredentials: {
|
||||
accountId: process.env.CLOUDFLARE_ACCOUNT_ID,
|
||||
databaseId: process.env.CLOUDFLARE_DATABASE_ID,
|
||||
token: process.env.CLOUDFLARE_D1_TOKEN,
|
||||
},
|
||||
verbose: true,
|
||||
strict: true,
|
||||
});
|
||||
Reference in New Issue
Block a user