Beautified launch printout
This commit is contained in:
parent
6ae652b47c
commit
cb3fc9bb91
|
|
@ -19,6 +19,7 @@ const {mongoose} = require('mongoose');
|
|||
|
||||
//Local Imports
|
||||
const config = require('./../../config.json');
|
||||
const loggerUtils = require('./../utils/loggerUtils');
|
||||
|
||||
/**
|
||||
* DB Schema for single document for keeping track of server stats
|
||||
|
|
@ -94,8 +95,7 @@ statSchema.statics.incrementLaunchCount = async function(){
|
|||
this.firstLaunch = stats.firstLaunch;
|
||||
|
||||
//print bootup message to console.
|
||||
console.log(`${config.instanceName}(Powered by Canopy) initialized. This server has booted ${stats.launchCount} time${stats.launchCount == 1 ? '' : 's'}.`)
|
||||
console.log(`First booted on ${stats.firstLaunch}.`);
|
||||
loggerUtils.welcomeWagon(stats.launchCount, stats.firstLaunch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -222,6 +222,6 @@ async function asyncKickStart(){
|
|||
|
||||
//Listen Function
|
||||
webServer.listen(port, () => {
|
||||
console.log(`Tokes up on port ${port}!`);
|
||||
console.log(`Tokes up on port \x1b[4m\x1b[35m${port}\x1b[0m!`);
|
||||
});
|
||||
}
|
||||
|
|
@ -210,3 +210,26 @@ module.exports.dumpError = async function(err, date = new Date()){
|
|||
module.exports.consoleWarn(doubleErr);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.welcomeWagon = function(count, date){
|
||||
//Inject values into ascii art
|
||||
const art = `
|
||||
\x1b[32m ! \x1b[0m
|
||||
\x1b[32m 420 \x1b[0m \x1b[32m\x1b[40m${config.instanceName}\x1b[0m\x1b[2m, Powered By:\x1b[0m
|
||||
\x1b[32m 420 \x1b[0m
|
||||
\x1b[32m WEEED \x1b[0m CCCC AAA NN N OOO PPPP Y Y
|
||||
\x1b[32m! WEEED !\x1b[0m C A A NN N O O P P Y Y
|
||||
\x1b[32mWEE EEEEE EED\x1b[0m C A A N N N O O P P Y Y
|
||||
\x1b[32m WEE EEEEE EED\x1b[0m C AAAAA N N N O O PPPP Y
|
||||
\x1b[32m WEE EEE EED\x1b[0m C A A N N N O O P Y
|
||||
\x1b[32m WEE EEE EED\x1b[0m C A A N NN O O P Y
|
||||
\x1b[32m WEEEEED\x1b[0m CCCC A A N NN OOO P Y
|
||||
\x1b[32m WEEE ! EEED\x1b[0m
|
||||
\x1b[32m !\x1b[0m \x1b[34mInitialization Complete!\x1b[0m This server has booted \x1b[4m${count}\x1b[0m time${count == 1 ? '' : 's'}.
|
||||
\x1b[32m !\x1b[0m This server was first booted on \x1b[4m${date}\x1b[0m.`
|
||||
|
||||
//Dump art to console
|
||||
console.log(art);
|
||||
//Add some extra padding for the port printout from server.js
|
||||
process.stdout.write(' ');
|
||||
}
|
||||
Loading…
Reference in a new issue