Skip to content

Instantly share code, notes, and snippets.

@artemis15
Created September 16, 2019 18:49
Show Gist options
  • Save artemis15/a9f7db64dee39dedfcd2219881693a3d to your computer and use it in GitHub Desktop.
Save artemis15/a9f7db64dee39dedfcd2219881693a3d to your computer and use it in GitHub Desktop.
Logger and upper layer handler
const apiRoutes = require('./apis/mainApi');
const init =(server) => {
server.get('*',function(req,res,next){
console.log('Request was made to: ' + req.originalUrl);
return next();
});
server.use('/api',apiRoutes);
}
module.exports = {
init : init
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment