Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* console.log(req.url, ' failed: ', err.stack);
* next(err);
* });
*/
// The ultimate error handler.
app.use(loopback.errorHandler());
/*
* 5. Add a basic application status route at the root `/`.
*
* (remove this to handle `/` on your own)
*/
app.get('/', loopback.status());
/*
* 6. Enable access control and token based authentication.
*/
var swaggerRemote = app.remotes().exports.swagger;
if (swaggerRemote) {
swaggerRemote.requireToken = false;
}
app.use(loopback.token({model: app.models.accessToken}));
app.enableAuth();
/*
* 7. Optionally start the server
*
* console.log(req.url, ' failed: ', err.stack);
* next(err);
* });
*/
// The ultimate error handler.
app.use(loopback.errorHandler());
/*
* 5. Add a basic application status route at the root `/`.
*
* (remove this to handle `/` on your own)
*/
app.get('/', loopback.status());
/*
* 6. Enable access control and token based authentication.
*/
var swaggerRemote = app.remotes().exports.swagger;
if (swaggerRemote) {
swaggerRemote.requireToken = false;
}
/*
* 7. Optionally start the server
*
* (only if this module is the main module)
*/
* console.log(req.url, ' failed: ', err.stack);
* next(err);
* });
*/
// The ultimate error handler.
app.use(loopback.errorHandler());
/*
* 5. Add a basic application status route at the root `/`.
*
* (remove this to handle `/` on your own)
*/
app.get('/', loopback.status());
/*
* 6. Enable access control and token based authentication.
*/
var swaggerRemote = app.remotes().exports.swagger;
if (swaggerRemote) swaggerRemote.requireToken = false;
app.enableAuth();
/*
* 7. Optionally start the server
*
* (only if this module is the main module)
*/
* console.log(req.url, ' failed: ', err.stack);
* next(err);
* });
*/
// The ultimate error handler.
app.use(loopback.errorHandler());
/*
* 5. Add a basic application status route at the root `/`.
*
* (remove this to handle `/` on your own)
*/
app.get('/', loopback.status());
/*
* 6. Enable access control and token based authentication.
*/
var swaggerRemote = app.remotes().exports.swagger;
if (swaggerRemote) swaggerRemote.requireToken = false;
app.enableAuth();
/*
* 7. Optionally start the server
*
* (only if this module is the main module)
*/
* app.use(function(err, req, resp, next) {
* console.log(req.url, ' failed: ', err.stack);
* next(err);
* });
*/
// The ultimate error handler.
app.use(errorHandler());
/*
* 5. Add a basic application status route at the root `/`.
*
* (remove this to handle `/` on your own)
*/
app.get('/', loopback.status());
/*
* 6. Enable access control and token based authentication.
*/
const swaggerRemote = app.remotes().exports.swagger;
if (swaggerRemote) {
swaggerRemote.requireToken = false;
}
/*
* 7. Optionally start the server
*
* (only if this module is the main module)
*/
* console.log(req.url, ' failed: ', err.stack);
* next(err);
* });
*/
// The ultimate error handler.
app.use(loopback.errorHandler());
/*
* 5. Add a basic application status route at the root `/`.
*
* (remove this to handle `/` on your own)
*/
app.get('/status', loopback.status());
/*
* 6. Enable access control and token based authentication.
*/
var swaggerRemote = app.remotes().exports.swagger;
if (swaggerRemote) swaggerRemote.requireToken = false;
app.enableAuth();
/*
* 7. Optionally start the server
*
* (only if this module is the main module)
*/
* console.log(req.url, ' failed: ', err.stack);
* next(err);
* });
*/
// The ultimate error handler.
app.use(loopback.errorHandler());
/*
* 5. Add a basic application status route at the root `/`.
*
* (remove this to handle `/` on your own)
*/
app.get('/', loopback.status());
/*
* 6. Enable access control and token based authentication.
*/
var swaggerRemote = app.remotes().exports.swagger;
if (swaggerRemote) swaggerRemote.requireToken = false;
app.enableAuth();
/*
* 7. Optionally start the server
*
* (only if this module is the main module)
*/