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);