fixxed server.js and some other stuff

This commit is contained in:
florianspengler 2024-11-15 08:09:55 +01:00
parent 47cc1b0424
commit ce181e35f1
5 changed files with 11 additions and 12 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, X-Content-Type-Options=nosniff"> <meta name="viewport" content="width=device-width, initial-scale=1.0, X-Content-Type-Options=nosniff">
<title>Document</title> <title>Document</title>
<link rel="stylesheet" href="styles-main.css"> <link rel="stylesheet" href="./Styles/styles-main.css"https://gitea.vexhosting.dynv6.net/Berufsschule/Webshop.git>
</head> </head>
<body> <body>
<h1>Hello there...</h1> <h1>Hello there...</h1>

View File

@ -1,8 +0,0 @@
const path = require('path');
const router = require('express').Router();
router.get('/status', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/check-status.html'));
});
module.exports = router;

View File

@ -0,0 +1,8 @@
const path = require('path');
const router = require('express').Router();
router.get('/', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/index.html'));
});
module.exports = router;

View File

@ -17,11 +17,10 @@ app.use(express.json());
app.use(express.urlencoded({ extended: true })); app.use(express.urlencoded({ extended: true }));
app.use(express.static(path.join(__dirname, 'static'))); app.use(express.static(path.join(__dirname, 'static')));
app.use(express.static(path.join(__dirname, '/scripts'))); app.use(express.static(path.join(__dirname, '/scripts')));
app.use(express.static(path.join(__dirname, '/scripts/modules')));
const get_status = require('./scripts/routes/other/getstatus.js'); const getIndexRoute = require('./scripts/routes/other/route-index');
app.use(get_status); app.use('/', getIndexRoute);
app.listen(process.env.APP_PORT, () => { app.listen(process.env.APP_PORT, () => {
console.log("\x1b[32m"); console.log("\x1b[32m");