Refactoring code and structure

This commit is contained in:
2022-01-29 14:48:58 +01:00
parent 416ccab7ef
commit 4d54ea04b9
16 changed files with 132 additions and 44 deletions

23
server/logger.js Normal file
View File

@@ -0,0 +1,23 @@
/**
* Simplest logger function, takes two argument: first one put between
* square brackets (the protocol), the second one it's the effective message
* @param {string} proto protocol
* @param {string} args message
*/
const logger = (proto, args) => {
console.log(`[${proto}]\t${args}`)
}
/**
* CLI splash
*/
const splash = () => {
console.log("-------------------------------------------------")
console.log("yt-dlp-webUI - A web-ui for yt-dlp, simply enough")
console.log("-------------------------------------------------")
}
module.exports = {
logger: logger,
splash: splash,
}