-
Benoit Alessandroni authoreda3c54562
server.js 369 B
const port = 9000;
const browserSyncPort = 3000;
const distPath = 'dist';
// express server
const { join } = require('path');
const express = require('express');
const app = express();
app
.use(express.static(distPath))
.get('/:lang/:path([^.]*)', (req, rep) => {
rep.sendFile(join(__dirname, distPath, `${req.params.lang}/index.html`));
})
.listen(port);