Skip to content

Commit

Permalink
Merge pull request #56 from andela/ch-setup-morgan-168402426
Browse files Browse the repository at this point in the history
 setup morgan for logging
  • Loading branch information
tejiri4 committed Sep 10, 2019
2 parents 53359c0 + 979e535 commit bf2b635
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@
"jsonwebtoken": "^8.5.1",
"method-override": "^3.0.0",
"mock-req-res": "^1.1.1",
"morgan-body": "^2.4.7",
"multer": "^1.4.2",
"multer-storage-cloudinary": "^2.2.1",
"passport": "^0.4.0",
"passport-facebook": "^3.0.0",
"passport-google-oauth2": "^0.2.0",
"passport-strategy": "^1.0.0",
"multer": "^1.4.2",
"multer-storage-cloudinary": "^2.2.1",
"pg": "^7.12.1",
"pg-hstore": "^2.3.3",
"pusher": "^2.2.2",
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import express from 'express';
import trimmer from 'trim-request-body';
import cors from 'cors';
import debug from 'debug';
import morganBody from 'morgan-body';
import methodOverride from 'method-override';
import swaggerUi from 'swagger-ui-express';
import messages from './utils/messages';
Expand All @@ -19,6 +20,9 @@ const app = express();
const infoLog = debug('http:info');
const router = express.Router();

// Log http information to console
morganBody(app, { prettify: false });

// Pass router to routes
routes(router);

Expand Down

0 comments on commit bf2b635

Please sign in to comment.