1e62aa976d
this should greatly reduce the complexity of the l10n code and build pipeline and eliminate the most common error seen in sentry logs (no translate function)
17 lines
594 B
JavaScript
17 lines
594 B
JavaScript
const assets = require('../../common/assets');
|
|
const routes = require('../routes');
|
|
const pages = require('../routes/pages');
|
|
const tests = require('../../test/frontend/routes');
|
|
const expressWs = require('express-ws');
|
|
|
|
module.exports = function(app, devServer) {
|
|
assets.setMiddleware(devServer.middleware);
|
|
expressWs(app, null, { perMessageDeflate: false });
|
|
app.ws('/api/ws', require('../routes/ws'));
|
|
routes(app);
|
|
tests(app);
|
|
// webpack-dev-server routes haven't been added yet
|
|
// so wait for next tick to add 404 handler
|
|
process.nextTick(() => app.use(pages.notfound));
|
|
};
|