diff --git a/src/schemas/statSchema.js b/src/schemas/statSchema.js index d1af85e..e7da67a 100644 --- a/src/schemas/statSchema.js +++ b/src/schemas/statSchema.js @@ -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); } /** diff --git a/src/server.js b/src/server.js index 333dfc3..1799b24 100644 --- a/src/server.js +++ b/src/server.js @@ -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!`); }); } \ No newline at end of file diff --git a/src/utils/loggerUtils.js b/src/utils/loggerUtils.js index a3100e8..2ae399e 100644 --- a/src/utils/loggerUtils.js +++ b/src/utils/loggerUtils.js @@ -209,4 +209,27 @@ module.exports.dumpError = async function(err, date = new Date()){ //Dump the error we had saving that error to file to console 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(' '); } \ No newline at end of file