Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express');
- module.exports.http = {
- middleware: {
- order: [
- 'startRequestTimer',
- 'cookieParser',
- 'session',
- 'myRequestLogger',
- 'myMiddleware',
- 'bodyParser',
- 'handleBodyParserError',
- 'compress',
- 'methodOverride',
- 'poweredBy',
- '$custom',
- 'router',
- 'www',
- 'favicon',
- '404',
- '500'
- ],
- myRequestLogger: function (req, res, next) {
- console.log("Requested :: ", req.method, req.url);
- return next();
- }
- myMiddleware: function (app) {
- app.use(express.static(__dirname + '/swagger-ui/'));
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement