-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathormconfig.js
More file actions
47 lines (41 loc) · 896 Bytes
/
ormconfig.js
File metadata and controls
47 lines (41 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const STD_PORT = {
mysql: 3306,
mariadb: 3306,
postgres: 5432,
oracle: 1521,
mssql: 1433,
mongodb: 27017
}
const DB = JSON.parse(process.env.DB||'{}');
if (!!DB.type && !DB.port && !!STD_PORT[DB.type]) {
DB.PORT = STD_PORT[DB.type];
}
module.exports = {
/*
type: "mysql",
host: "localhost",
port: 3306,
username: "test",
password: "...",
database: "test",
type: "postgres",
host: "localhost",
port: 5432,
username: "postgres",
password: "...",
database: "redaktor",
entities: ['dist/** /**.entity{.ts,.js}'],
synchronize: true,
logging: true */
entities: ['dist/**/**.entity{.ts,.js}'],
synchronize: true,
//migrationsRun: true,
//logging: log,
migrations: [
__dirname + '/dist/migrations/*{.ts,.js}',
],
cli: { migrationsDir: __dirname + '/src/migrations' },
logging: true,
type: `sqlite`,
database: `./data.sqlite`
}