From c27d72bf40146181d903336a514d9bd410252acd Mon Sep 17 00:00:00 2001 From: mrfry Date: Fri, 7 Apr 2023 16:33:11 +0200 Subject: [PATCH] removed main module --- src/modules.json | 6 --- src/modules/main/main.ts | 68 --------------------------------- src/modules/main/views/main.ejs | 39 ------------------- 3 files changed, 113 deletions(-) delete mode 100644 src/modules/main/main.ts delete mode 100755 src/modules/main/views/main.ejs diff --git a/src/modules.json b/src/modules.json index 158fb11..05a9966 100644 --- a/src/modules.json +++ b/src/modules.json @@ -20,11 +20,5 @@ "publicdirs": ["publicDirs/qminingPublic/"], "name": "api", "route": "/api" - }, - "main": { - "path": "./modules/main/main.js", - "publicdirs": ["publicDirs/public/"], - "name": "main", - "route": "/frylabs" } } diff --git a/src/modules/main/main.ts b/src/modules/main/main.ts deleted file mode 100644 index 6d85491..0000000 --- a/src/modules/main/main.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* ---------------------------------------------------------------------------- - - Question Server - GitLab: - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - ------------------------------------------------------------------------- */ - -// package requires -import express, { RequestHandler } from 'express' -const app = express() - -// other requires -import { SetupData } from '../../server' -import { ModuleType } from '../../types/basicTypes' - -// stuff gotten from server.js -let publicdirs: string[] = [] -let url = '' // http(s)//asd.basd - -function GetApp(): ModuleType { - app.set('view engine', 'ejs') - app.set('views', ['./src/modules/main/views', './src/sharedViews']) - publicdirs.forEach((pdir) => { - app.use(express.static(pdir)) - }) - - app.use(express.json() as RequestHandler) - app.use( - express.urlencoded({ - limit: '5mb', - extended: true, - }) as RequestHandler - ) - - // -------------------------------------------------------------- - - app.get('/', function (_req, res) { - res.render('main', { - siteurl: url, - }) - }) - - return { - app: app, - } -} - -export default { - name: 'Main', - getApp: GetApp, - setup: (data: SetupData): void => { - url = data.url - publicdirs = data.publicdirs - }, -} diff --git a/src/modules/main/views/main.ejs b/src/modules/main/views/main.ejs deleted file mode 100755 index 5d2af9b..0000000 --- a/src/modules/main/views/main.ejs +++ /dev/null @@ -1,39 +0,0 @@ - - - - frylabs.net - - - - -

-
 /$$$$$$$$                  /$$           /$$                                          /$$    
-| $$_____/                 | $$          | $$                                         | $$    
-| $$     /$$$$$$  /$$   /$$| $$  /$$$$$$ | $$$$$$$   /$$$$$$$    /$$$$$$$   /$$$$$$  /$$$$$$  
-| $$$$$ /$$__  $$| $$  | $$| $$ |____  $$| $$__  $$ /$$_____/   | $$__  $$ /$$__  $$|_  $$_/  
-| $$__/| $$  \__/| $$  | $$| $$  /$$$$$$$| $$  \ $$|  $$$$$$    | $$  \ $$| $$$$$$$$  | $$    
-| $$   | $$      | $$  | $$| $$ /$$__  $$| $$  | $$ \____  $$   | $$  | $$| $$_____/  | $$ /$$
-| $$   | $$      |  $$$$$$$| $$|  $$$$$$$| $$$$$$$/ /$$$$$$$//$$| $$  | $$|  $$$$$$$  |  $$$$/
-|__/   |__/       \____  $$|__/ \_______/|_______/ |_______/|__/|__/  |__/ \_______/   \___/  
-                  /$$  | $$                                                                   
-                 |  $$$$$$/                                                                   
-                  \______/
-

- -