diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-05-14 23:54:39 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-05-14 23:54:39 +0900 |
| commit | e5409db0e82380d743907a538f60bd01434359eb (patch) | |
| tree | 6e34f0a759c31fce07133142e3449cfa96acaeaf /src | |
| parent | Update CHANGELOG.md (diff) | |
| download | sharkey-e5409db0e82380d743907a538f60bd01434359eb.tar.gz sharkey-e5409db0e82380d743907a538f60bd01434359eb.tar.bz2 sharkey-e5409db0e82380d743907a538f60bd01434359eb.zip | |
Resolve #4925
Diffstat (limited to 'src')
| -rw-r--r-- | src/ormconfig.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ormconfig.ts b/src/ormconfig.ts new file mode 100644 index 0000000000..91f33181f4 --- /dev/null +++ b/src/ormconfig.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; +import config from './config'; + +const json = { + type: 'postgres', + host: config.db.host, + port: config.db.port, + username: config.db.user, + password: config.db.pass, + database: config.db.db, + entities: ['src/models/entities/*.ts'], + migrations: ['migration/*.ts'], + cli: { + migrationsDir: 'migration' + } +}; + +fs.writeFileSync('ormconfig.json', JSON.stringify(json)); |