Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
};
options.preRouterHook = gatekeeperAuthentication;
function serveFrontend(app) {
app.use('/', express.static('/frontend'));
}
options.preHook = serveFrontend;
if (process.env.DATABASE_URL_FILE) {
options.databaseUrl = fs.readFileSync(process.env.DATABASE_URL_FILE);
}
unleash
.start(options)
.then(server => {
console.log(
`Unleash API started on http://localhost:${server.app.get('port')}`
);
});