kahvi.juustodiilerit.fi/backend/knexfile.ts

26 lines
529 B
TypeScript
Raw Permalink Normal View History

2026-01-05 23:39:34 +02:00
import path from 'path'
import type { Knex } from 'knex'
// Update with your config settings.
// this `data` folder should be mounted in the docker-compose in production, or mkdired in development
const dbPath = path.join(process.env.DB_PREFIX ?? '../data/', '/database.db')
const baseConfig = {
client: 'better-sqlite3',
connection: {
filename: dbPath,
},
}
const config: { [key: string]: Knex.Config } = {
development: baseConfig,
staging: baseConfig,
production: baseConfig
};
module.exports = config;