var fs = require('fs'); var path = require('path'); var express = require('express'); var app = express(); app.use(express.static(path.resolve(__dirname, './dist'))); app.get('*', function (req, res) { const html = fs.readFileSync(path.resolve(__dirname, './dist/index.html'), 'utf-8'); res.send(html); }) app.listen(3001, () => console.log('Listening on port 3001'));