express-watcher
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -12,9 +12,10 @@ var express = require('express') | ||
// example with callback function | ||
app.use(function(req, res, next){ | ||
resourceMonitorMiddlewareCB(req, res, next, function(diffJson){ | ||
console.log(' diffJson : ', diffJson) | ||
}) | ||
}) | ||
// app.use(function(req, res, next){ | ||
// resourceMonitorMiddlewareCB(req, res, next, function(diffJson){ | ||
// console.log(' diffJson : ', diffJson) | ||
// }) | ||
// }) | ||
app.get('/', function (req, res) { | ||
@@ -24,4 +25,10 @@ res.send('Hello World!') | ||
app.listen(3000, function () { | ||
console.log('Example app listening on port 3000!') | ||
app.get('/:id', function (req, res) { | ||
res.send('World ID:' + req.params.id) | ||
}) | ||
var port = 3004 | ||
app.listen(port, function () { | ||
console.log('Example app listening on port ' +port+ '!') | ||
}) |
@@ -140,2 +140,4 @@ | ||
var diffJson = diffHandle(_m0, _m1, diffCPU, diffTime) | ||
console.log('*_*_*_*_*_*_*_*_*_*_*_*\n', req.originalUrl) | ||
printDiffJson(diffJson) | ||
@@ -142,0 +144,0 @@ if(cb) cb(diffJson) |
{ | ||
"name": "express-watcher", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "It is a middleware of monitoring Express router, this middleware can be used either globally or on a per-route basis and sends information of response time, used memory and CPU.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8540
141