Files
workavia-drive/twake/frontend/scripts/server.js
T
montaghanmy 10fe6f78d1 feat: init
2023-03-23 11:03:16 +01:00

14 lines
379 B
JavaScript
Executable File

var connect = require('connect');
var serveStatic = require('serve-static');
connect()
.use(serveStatic(__dirname + '/../public/'), {
fallthrough: true,
})
.use((req, res, next) => {
req.path = req.url = '/index.html';
serveStatic(__dirname + '/../public/')(req, res, next);
})
.listen(8080, function() {
console.log('Server running on 8080...');
});