Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function bootServices(app) {
const user = getUserServices(app);
Fetchr.registerFetcher(user);
const middleware = Fetchr.middleware();
app.use('/external/services', middleware);
app.use('/internal/services', middleware);
}
export default function bootServices(app) {
const hikesService = getHikesService(app);
Fetchr.registerFetcher(hikesService);
app.use('/services', Fetchr.middleware());
}
return (req: any, res: any, next: Function) => {
res.startTime("apigateway", "API Gateway");
return Fetchr.middleware({
responseFormatter: (
req: Request,
res: Response & { endTime: Function },
data: any,
) => {
res.endTime("apigateway");
return data;
},
})(req, res, next);
};
}
getMiddleware: function (options) {
return Fetchr.middleware(options);
},
/**