card-drop/src/database/dataSources/cardDataSource.ts
Ethan Lane 8b3fb062f0
All checks were successful
continuous-integration/drone/push Build is passing
Add deployment scripts (#18)
#3

Reviewed-on: https://gitea.vylpes.xyz/External/card-drop/pulls/18
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-09-03 20:52:55 +01:00

22 lines
No EOL
517 B
TypeScript

import { DataSource } from "typeorm";
import * as dotenv from "dotenv";
dotenv.config();
const CardDataSource = new DataSource({
type: "sqlite",
database: process.env.DB_CARD_FILE!,
synchronize: true,
logging: process.env.DB_LOGGING == "true",
entities: [
"dist/database/entities/card/**/*.js",
],
migrations: [
"dist/database/migrations/card/**/*.js",
],
subscribers: [
"dist/database/subscribers/card/**/*.js",
],
});
export default CardDataSource;