-
Notifications
You must be signed in to change notification settings - Fork 0
/
ormconfig.js
49 lines (49 loc) · 1.4 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = [
{
"name": "deafult",
"type": "postgres",
"port": process.env.POSTGRES_PORT || 5432,
"host": process.env.POSTGRES_HOST || "localhost",
"username": process.env.POSTGRES_USER || "docker",
"password": process.env.POSTGRES_PASSWORD || "password",
"database": process.env.POSTGRES_DATABASE || "database",
"migrations": [
"./src/shared/infra/typeorm/migrations/*.ts"
],
"entities": [
"./src/modules/**/entities/*.ts"
],
"cli": {
"migrationsDir": "./src/shared/infra/typeorm/migrations"
}
},
{
"name": "seed",
"type": "postgres",
"port": process.env.POSTGRES_PORT || 5432,
"host": process.env.POSTGRES_HOST || "localhost",
"username": process.env.POSTGRES_USER || "docker",
"password": process.env.POSTGRES_PASSWORD || "password",
"database": process.env.POSTGRES_DATABASE || "database",
"migrations": [
"./src/shared/infra/typeorm/seeds/*.ts"
],
"entities": [
"./src/modules/**/entities/*.ts"
],
"cli": {
"migrationsDir": "./src/shared/infra/typeorm/seeds"
}
},
{
"name": "mongo",
"type": "mongodb",
"host": process.env.MONGO_HOST || "localhost",
"port": process.env.MONGO_PORT || 27017,
"database": process.env.MONGO_DATABASE || "database",
"useUnifiedTopology": true,
"entities": [
"./src/modules/**/infra/typeorm/schemas/*.ts"
]
}
]