Skip to content
Snippets Groups Projects
server.js 369 B
Newer Older
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`));
Alice Poggioli's avatar
Alice Poggioli committed
  })
  .listen(port);