mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-05 08:33:09 +02:00
19 lines
393 B
TypeScript
19 lines
393 B
TypeScript
|
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));
|