-
Notifications
You must be signed in to change notification settings - Fork 0
/
ormconfig.js
29 lines (29 loc) · 899 Bytes
/
ormconfig.js
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
module.exports = [
{
name: 'development',
type: 'mongodb',
database: 'graphjwtauth',
synchronize: true,
logging: true,
useUnifiedTopology: true,
entities: ['backend/graphql/entity/**/*.ts'],
migrations: ['backend/graphql/migration/**/*.js'],
subscribers: ['backend/graphql/subscriber/**/*.ts'],
cli: {
entitiesDir: 'backend/graphql/entity',
migrationsDir: 'backend/graphql/migration',
subscribersDir: 'backend/graphql/subscriber',
},
},
{
name: 'production',
type: 'mongodb',
database: 'graphjwtauth',
synchronize: true, // switch this to false once you have the initial tables created and use migrations instead
logging: false,
useUnifiedTopology: true,
entities: ['dist/graphql/entity/*.js'],
migrations: ['dist/graphql/migration/*.js'],
subscribers: ['dist/graphql/subscriber/*.js'],
},
];