mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 17:40:46 -04:00
dynamic http embeds, kofi button, etc
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
const path = require('path');
|
||||
const http = require('http');
|
||||
const express = require('express');
|
||||
const morgan = require('morgan');
|
||||
@@ -7,13 +6,7 @@ const config = require('./config');
|
||||
const app = express();
|
||||
app.use(morgan('dev'));
|
||||
app.use(express.json());
|
||||
app.use(express.static(config.staticDir));
|
||||
app.get('/spectate', (req, res) => {
|
||||
res.sendFile(path.join(config.staticDir, 'index.html'));
|
||||
});
|
||||
app.get('/mini', (req, res) => {
|
||||
res.sendFile(path.join(config.staticDir, 'index.html'));
|
||||
});
|
||||
app.use(express.static(config.staticDir, { index: false }));
|
||||
|
||||
const httpServer = http.createServer(app);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user