From e4fb9c0c1296fd4bc4de9461487b8fcb0deec41d Mon Sep 17 00:00:00 2001 From: tycrek Date: Wed, 23 Jun 2021 14:50:57 -0600 Subject: [PATCH] added some comments (DeepSource trigger) --- ass.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ass.js b/ass.js index 78db917..ae17f66 100755 --- a/ass.js +++ b/ass.js @@ -37,6 +37,9 @@ let users = {}; let data = {}; //#endregion +/** + * Operations to run to ensure ass can start properly + */ function preStartup() { // Make sure data.json exists if (!fs.existsSync(path('data.json'))) { @@ -66,6 +69,10 @@ function preStartup() { fs.ensureDirSync(path(diskFilePath, 'thumbnails')); } +/** + * Builds the router + * ///todo: make this separate + */ function startup() { app.enable('case sensitive routing'); app.set('trust proxy', isProxied); @@ -294,6 +301,7 @@ function startup() { .catch(console.error); }); + // Host the server app.listen(port, host, () => log(`Server started on [${host}:${port}]\nAuthorized users: ${Object.keys(users).length}\nAvailable files: ${Object.keys(data).length}`)); }