mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 19:49:25 +01:00
26 lines
677 B
TypeScript
26 lines
677 B
TypeScript
import env from '#start/env'
|
|
import { defineConfig } from '@adonisjs/lucid'
|
|
|
|
const dbConfig = defineConfig({
|
|
connection: 'mysql',
|
|
connections: {
|
|
mysql: {
|
|
client: 'mysql2',
|
|
debug: env.get('NODE_ENV') === 'development',
|
|
connection: {
|
|
host: env.get('DB_HOST'),
|
|
port: env.get('DB_PORT') ?? 3306, // Default MySQL port
|
|
user: env.get('DB_USER'),
|
|
password: env.get('DB_PASSWORD'),
|
|
database: env.get('DB_DATABASE'),
|
|
ssl: env.get('DB_SSL') ?? true, // Default to true
|
|
},
|
|
migrations: {
|
|
naturalSort: true,
|
|
paths: ['database/migrations'],
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
export default dbConfig |