This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
wikipedia-game-solver/apps/api/src/config/database.ts

25 lines
578 B
TypeScript
Raw Normal View History

2024-08-09 23:51:41 +02:00
import env from "#start/env.js"
import { defineConfig } from "@adonisjs/lucid"
const databaseConfig = defineConfig({
connection: "mysql",
connections: {
mysql: {
client: "mysql2",
connection: {
host: env.get("DATABASE_HOST"),
port: env.get("DATABASE_PORT"),
user: env.get("DATABASE_USER"),
password: env.get("DATABASE_PASSWORD"),
database: env.get("DATABASE_NAME"),
},
migrations: {
naturalSort: true,
paths: ["database/migrations"],
},
},
},
})
export default databaseConfig