mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
34 lines
1003 B
JavaScript
34 lines
1003 B
JavaScript
const express = require('express');
|
|
const router = express.Router({ strict: true });
|
|
const path = require('path');
|
|
|
|
router.get('/', function (request, response) {
|
|
response.sendFile(path.join(__dirname, '../../client/src/views/home.html'));
|
|
});
|
|
|
|
router.get('/create', function (request, response) {
|
|
response.sendFile(path.join(__dirname, '../../client/src/views/create.html'));
|
|
});
|
|
|
|
router.get('/join/:code', function (request, response) {
|
|
response.sendFile(path.join(__dirname, '../../client/src/views/join.html'));
|
|
});
|
|
|
|
router.get('/how-to-use', function (request, response) {
|
|
response.sendFile(path.join(__dirname, '../../client/src/views/how-to-use.html'));
|
|
});
|
|
|
|
router.get('/game/:code', function (request, response) {
|
|
response.sendFile(path.join(__dirname, '../../client/src/views/game.html'));
|
|
});
|
|
|
|
router.get('/liveness_check', (req, res) => {
|
|
res.sendStatus(200);
|
|
});
|
|
|
|
router.get('/readiness_check', (req, res) => {
|
|
res.sendStatus(200);
|
|
});
|
|
|
|
module.exports = router;
|