hubl/server.js

12 lines
297 B
JavaScript
Raw Normal View History

2019-05-14 12:03:11 +00:00
const port = 3000;
2018-09-28 19:20:15 +00:00
const distPath = 'www';
2018-11-14 15:33:03 +00:00
2018-09-28 19:20:15 +00:00
// express server
const { join } = require('path');
const express = require('express');
const app = express();
app
.use(express.static(distPath))
2019-05-14 12:03:11 +00:00
.get(/^[^.]*$/, (req, rep) => rep.sendFile(join(__dirname, distPath, '/index.html')))
2018-09-28 19:20:15 +00:00
.listen(port);