Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 7514171

Browse files
committed
Adds access log to stdout
1 parent 59b3c94 commit 7514171

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
var express = require('express')
2+
const morgan = require('morgan');
23
var app = express()
34
const os = require('os')
45

56
app.set('json spaces', 2);
67

8+
app.use(morgan('combined'));
9+
710
app.all('*', (req, res) => {
811
res.json({
912
path: req.path,

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"node": ">=6.3.0"
1414
},
1515
"dependencies": {
16-
"express": "4.14.0"
16+
"express": "4.14.0",
17+
"morgan": "^1.7.0"
1718
}
1819
}

0 commit comments

Comments
 (0)