Add archive downvote segment cron

This commit is contained in:
Haidang666
2021-07-09 11:46:04 +07:00
parent ef86fceedd
commit 6b5156468c
8 changed files with 149 additions and 2 deletions

View File

@@ -2,13 +2,17 @@ import {config} from "./config";
import {initDb} from './databases/databases';
import {createServer} from "./app";
import {Logger} from "./utils/logger";
import {startAllCrons} from "./cronjob";
async function init() {
await initDb();
createServer(() => {
Logger.info("Server started on port " + config.port + ".");
// ignite cron job after server created
startAllCrons();
});
}
init();