Add level to logs in app.js
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
ea50577946
commit
45b049714f
8
app.js
8
app.js
@ -26,7 +26,7 @@ const srvListen = process.env.OWL_SRV_LISTEN || "0.0.0.0"
|
||||
const srvPort = process.env.OWL_SRV_PORT || 8460
|
||||
|
||||
// Print version number:
|
||||
log.out(`app: Starting OwlBoard - Backend Version: ${version.app} - API versions: ${version.api}`);
|
||||
log.out(`app: Starting OwlBoard - Backend Version: ${version.app} - API versions: ${version.api}`, "init");
|
||||
|
||||
// Test for required vars:
|
||||
// const varTest = require('./src/utils/varTest.utils');
|
||||
@ -61,9 +61,9 @@ app.use('/api/v1/stats', statRtr)
|
||||
// Start Express
|
||||
app.listen(srvPort, srvListen, (error) =>{
|
||||
if(!error) {
|
||||
log.out(`app.listen: Listening on http://${srvListen}:${srvPort}`);
|
||||
log.out("app.listen: State - alive")
|
||||
log.out(`app.listen: Listening on http://${srvListen}:${srvPort}`, "init");
|
||||
log.out("app.listen: State - alive", "init")
|
||||
} else {
|
||||
log.out("app.listen: Error occurred, server can't start", error);
|
||||
log.out(`app.listen: Error occurred, server can't start ${error}`, "err");
|
||||
}
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
module.exports = valid
|
||||
|
||||
const valid = [
|
||||
"owlboard.co.uk",
|
||||
"owlboard.info",
|
||||
"fjla.uk",
|
||||
"gwr.com",
|
||||
"swrailway.com",
|
||||
|
Loading…
Reference in New Issue
Block a user