Files
Julianum/server.js
Dinawo 9233856850
All checks were successful
continuous-integration/drone Build is passing
chore: Update Dockerfile to use Node.js version 22 and expose port 8005
2024-07-04 16:19:43 +02:00

36 lines
861 B
JavaScript

const express = require('express');
const path = require('path');
const app = express();
const port = 8005;
app.use('/public', express.static(path.join(__dirname, 'public')));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'index.html'));
});
app.get('/legal', (req, res) => {
res.sendFile(path.join(__dirname, 'legal.html'));
});
app.get('/legal/privacy', (req, res) => {
res.sendFile(path.join(__dirname, 'privacy.html'));
});
app.get('/legal/cgu', (req, res) => {
res.sendFile(path.join(__dirname, 'cgu.html'));
});
app.get('/bot/feathures', (req, res) => {
res.sendFile(path.join(__dirname, 'feathures.html'));
});
app.get('/bot/commands', (req, res) => {
res.sendFile(path.join(__dirname, 'commands.html'));
});
app.listen(port, () => {
console.log(`Server is running on http://localhost:${port}`);
});