Now showing startup-time.

This commit is contained in:
BurnyLlama 2021-11-04 23:04:42 +01:00
parent f978f01a6e
commit c65845b528

View File

@ -15,6 +15,7 @@ import { generateDB } from './libs/database/generate.js'
import { dbInit } from './libs/database/init.js'
import { downloadEssentialData } from './libs/download/dowload.js'
const start = Date.now()
const log = initLog("[ MAIN ]")
// Read the .env file
@ -42,4 +43,7 @@ Server.use('/', routes)
Server.use('/api', routes)
Server.use('/assets', express.static('static'))
const elapsed = Date.now() - start
log(`Took ${elapsed/1000} seconds to start the server!`)
Server.listen(process.env.PORT ?? 12345, () => log(`Server started and listening on port ${process.env.PORT}.`))