Newer
Older
const { join } = require('path');
const express = require('express');
const app = express();
app
.use(express.static(distPath))
// .use('/src', express.static(join(__dirname, 'src')))
.get('/:lang/:path([^.]*)', (req, rep) => {
rep.sendFile(join(__dirname, distPath, `${req.params.lang}/index.html`));
.listen(port);
// browser sync
const bs = require('browser-sync').create();