Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function runDevelop(options, callback) {
var compiler = webpack(developConfig);
var app = express();
app.use(hopsExpressUtils.timings);
app.use(
webpackDevMiddleware(compiler, {
noInfo: true,
logLevel: 'warn',
publicPath: developConfig.output.publicPath,
watchOptions: developConfig.watchOptions,
serverSideRender: true,
})
);
app.use(webpackHotMiddleware(compiler));
app.use(hopsExpressUtils.rewritePath);
app.use(express.static(hopsConfig.buildDir, { redirect: false }));
hopsExpressUtils.bootstrap(app, hopsConfig);
hopsExpressUtils.registerMiddleware(
app,
createMiddleware(
nodeConfig,
nodeConfig.watchOptions || developConfig.watchOptions
)
);
hopsExpressUtils.teardown(app, hopsConfig);
hopsExpressUtils.run(app, callback);
}