removed main module

This commit is contained in:
mrfry 2023-04-07 16:33:11 +02:00
parent e858d7f23e
commit c27d72bf40
3 changed files with 0 additions and 113 deletions

View file

@ -20,11 +20,5 @@
"publicdirs": ["publicDirs/qminingPublic/"],
"name": "api",
"route": "/api"
},
"main": {
"path": "./modules/main/main.js",
"publicdirs": ["publicDirs/public/"],
"name": "main",
"route": "/frylabs"
}
}

View file

@ -1,68 +0,0 @@
/* ----------------------------------------------------------------------------
Question Server
GitLab: <https://gitlab.com/MrFry/mrfrys-node-server>
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 <https://www.gnu.org/licenses/>.
------------------------------------------------------------------------- */
// 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
},
}

View file

@ -1,39 +0,0 @@
<html>
<body bgcolor="#212127">
<head>
<title>frylabs.net</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
<style>
body {
margin: 0px;
height: 100%;
font: bold 0.75vw Verdana;
color: #999;
display: flex;
justify-content: center;
align-items: center;
user-select: none;
}
h2 {
color: #99f;
text-decoration: none;
}
</style>
</head>
<h2>
<pre> /$$$$$$$$ /$$ /$$ /$$
| $$_____/ | $$ | $$ | $$
| $$ /$$$$$$ /$$ /$$| $$ /$$$$$$ | $$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
| $$$$$ /$$__ $$| $$ | $$| $$ |____ $$| $$__ $$ /$$_____/ | $$__ $$ /$$__ $$|_ $$_/
| $$__/| $$ \__/| $$ | $$| $$ /$$$$$$$| $$ \ $$| $$$$$$ | $$ \ $$| $$$$$$$$ | $$
| $$ | $$ | $$ | $$| $$ /$$__ $$| $$ | $$ \____ $$ | $$ | $$| $$_____/ | $$ /$$
| $$ | $$ | $$$$$$$| $$| $$$$$$$| $$$$$$$/ /$$$$$$$//$$| $$ | $$| $$$$$$$ | $$$$/
|__/ |__/ \____ $$|__/ \_______/|_______/ |_______/|__/|__/ |__/ \_______/ \___/
/$$ | $$
| $$$$$$/
\______/</pre>
</h2>
</body>
</html>