- Consolidate SQLite database and file storage into `data/` directory. - Update `src/index.ts` to ensure `data` and `data/files` directories exist on startup. - Update `src/db.ts` to use hardcoded `file:./data/data.db` path. - Update `prisma.config.ts` to use absolute path to `data/data.db` for CLI compatibility. - Update `.gitignore` to ignore `data/` directory entirely. - Remove `.env.example` and `.env.test` as they are no longer needed.
7 lines
230 B
TypeScript
7 lines
230 B
TypeScript
import { PrismaLibSql } from '@prisma/adapter-libsql'
|
|
import { PrismaClient } from './generated/prisma/client'
|
|
|
|
const adapter = new PrismaLibSql({ url: 'file:./data/data.db' })
|
|
|
|
export const prisma = new PrismaClient({ adapter })
|