mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
refactor: startup
This commit is contained in:
@@ -6,17 +6,18 @@ const winston = require('winston');
|
|||||||
const start = module.exports;
|
const start = module.exports;
|
||||||
|
|
||||||
start.start = async function () {
|
start.start = async function () {
|
||||||
const db = require('./database');
|
|
||||||
|
|
||||||
printStartupInfo();
|
printStartupInfo();
|
||||||
|
|
||||||
addProcessHandlers();
|
addProcessHandlers();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const db = require('./database');
|
||||||
await db.init();
|
await db.init();
|
||||||
|
await db.checkCompatibility();
|
||||||
|
|
||||||
const meta = require('./meta');
|
const meta = require('./meta');
|
||||||
await db.checkCompatibility();
|
|
||||||
await meta.configs.init();
|
await meta.configs.init();
|
||||||
|
|
||||||
if (nconf.get('runJobs')) {
|
if (nconf.get('runJobs')) {
|
||||||
await runUpgrades();
|
await runUpgrades();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user