Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
if (context.status && context.status.code) {
let message = context.status.message || 'Error!';
if (!context.status.message && Number(context.status.code) === 404) {
message = 'Not found';
}
res.status(context.status.code).send(message);
} else if (context.redirect && context.redirect.url) {
res.redirect(context.redirect.code || 302, context.redirect.url);
}
const bundles = getLoadableBundles(modules);
res.status(200).send(
template({
html,
runtimeJSBundle: clientAssets['runtime~main.js'],
mainJSBundle: clientAssets['main.js'],
vendorJSBundle: clientAssets['vendor.js'],
mainCSSBundle: clientAssets['main.css'],
bundles,
})
);
});