This commit is contained in:
syuilo 2019-04-09 23:29:48 +09:00
parent 3dc2361654
commit e3c0058942
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 6 additions and 12 deletions

View File

@ -1,16 +1,10 @@
import { initDb } from './db/postgre';
async function main() {
try {
console.log('Connecting database...');
await initDb(false, true, true);
} catch (e) {
console.error('Cannot connect to database', null, true);
console.error(e);
process.exit(1);
}
console.log('Init database...');
initDb(false, true, true).then(() => {
console.log('Done :)');
}
main();
}, e => {
console.error('Failed to init database');
console.error(e);
});