Guest User

Untitled

a guest
Mar 17th, 2015
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. var express = require('express');
  2. module.exports.http = {
  3.  
  4. middleware: {
  5. order: [
  6. 'startRequestTimer',
  7. 'cookieParser',
  8. 'session',
  9. 'myRequestLogger',
  10. 'bodyParser',
  11. 'handleBodyParserError',
  12. 'compress',
  13. 'methodOverride',
  14. 'poweredBy',
  15. '$custom',
  16. 'router',
  17. 'www',
  18. 'favicon',
  19. '404',
  20. '500'
  21. ],
  22. myRequestLogger: function (req, res, next) {
  23. console.log("Requested :: ", req.method, req.url);
  24. return next();
  25. }
  26. },
  27. customMiddleware: function (app) {
  28. app.use(express.static(__dirname + '/swagger-ui/'));
  29. }
  30. };
Advertisement
Add Comment
Please, Sign In to add comment