folder-structure #9
@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, X-Content-Type-Options=nosniff">
|
||||
<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>
|
||||
<body>
|
||||
<h1>Hello there...</h1>
|
||||
@ -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;
|
||||
8
scripts/routes/other/route-index.js
Normal file
8
scripts/routes/other/route-index.js
Normal 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;
|
||||
@ -17,11 +17,10 @@ app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
app.use(express.static(path.join(__dirname, 'static')));
|
||||
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, () => {
|
||||
console.log("\x1b[32m");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user