mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
Refactor
This commit is contained in:
parent
3dc2361654
commit
e3c0058942
18
src/init.ts
18
src/init.ts
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user