Backend half
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { DataSource, DataSourceOptions } from "typeorm"
|
||||
|
||||
|
||||
|
||||
const options: DataSourceOptions = {
|
||||
type: "mariadb",
|
||||
host: process.env.DB_HOST || "localhost",
|
||||
port: parseInt(process.env.DB_PORT || "3306"),
|
||||
username: process.env.DB_USER || "root",
|
||||
password: process.env.DB_PASSWORD || "password",
|
||||
database: process.env.DB_NAME || "SerpentRace",
|
||||
synchronize: true,
|
||||
logging: false,
|
||||
entities: ['src/Database/entities/*.entity.ts'],
|
||||
subscribers: [],
|
||||
migrationsRun: false,
|
||||
migrations: ['src/Database/migrations/*.ts'],
|
||||
migrationsTableName: 'history'
|
||||
};
|
||||
|
||||
export const AppDataSource = new DataSource(options);
|
||||
Reference in New Issue
Block a user