📅  最后修改于: 2022-03-11 15:01:21.029000             🧑  作者: Mango
require('dotenv/config');
const database = {
development: "dev-db",
production: 'prod-db',
test: 'test-db'
}
module.exports = {
type: 'postgres',
host: 'localhost',
port: 5432,
username: 'ur-username',
password: 'password',
database: database[process.env.NODE_ENV],
entities: ['dist/**/*.entity{.ts,.js}'],
synchronize: true,
migrationsTableName: 'migration',
migrations: ['migration/*.js'],
cli: {
migrationsDir: 'migration',
},
};