Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// to worry about constantly pulling in JS updates.
if (options.uiDirs) {
if (typeof options.uiDirs === 'string') {
router.use(loopback.static(options.uiDirs));
} else if (Array.isArray(options.uiDirs)) {
options.uiDirs.forEach(function(dir) {
router.use(loopback.static(dir));
});
}
}
// File in node_modules are overridden by a few customizations
router.use(loopback.static(STATIC_ROOT));
// Swagger UI distribution
router.use(loopback.static(SWAGGER_UI_ROOT));
}
return router;
}