Implement version checking
This commit is contained in:
parent
8e47cd9ea9
commit
767cfbf488
4 changed files with 38 additions and 2 deletions
|
@ -11,6 +11,7 @@ import pgSessionStore from "connect-pg-simple";
|
|||
import fetch, { Response as FetchResponse } from "node-fetch";
|
||||
import db from "./db";
|
||||
import errorHandler from "./errors";
|
||||
import * as version from "./version";
|
||||
|
||||
|
||||
console.log("Starting at " + new Date().toISOString());
|
||||
|
@ -345,6 +346,7 @@ async function processBannedUsers() {
|
|||
|
||||
setTimeout(processBannedUsers,600000+Math.floor(Math.random()*600000))
|
||||
|
||||
app.listen(config.port, () => {
|
||||
// Check version then listen
|
||||
version.checkVersion().then(_ => app.listen(config.port, () => {
|
||||
console.log(`Listening on port ${config.port}`);
|
||||
});
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue