Skip to content

Commit

Permalink
add express-status-monitor
Browse files Browse the repository at this point in the history
closes sahat#559
  • Loading branch information
sahat committed Sep 25, 2016
1 parent 479c8e2 commit f5b98a8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ List of Packages
| errorhandler | Express 4 middleware. |
| serve-favicon | Express 4 middleware offering favicon serving and caching. |
| express-flash | Provides flash messages for Express. |
| express-status-monitor | Reports real-time server metrics for Express. |
| express-validator | Easy form validation for Express. |
| fbgraph | Facebook Graph API library. |
| github | GitHub API library. |
| github | GitHub API library. |
| pug (jade) | Template engine for Express. |
| lastfm | Last.fm API library. |
| instagram-node | Instagram API library. |
Expand Down
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const path = require('path');
const mongoose = require('mongoose');
const passport = require('passport');
const expressValidator = require('express-validator');
const expressStatusMonitor = require('express-status-monitor');
const sass = require('node-sass-middleware');
const multer = require('multer');
const upload = multer({ dest: path.join(__dirname, 'uploads') });
Expand Down Expand Up @@ -61,6 +62,7 @@ mongoose.connection.on('error', () => {
app.set('port', process.env.PORT || 3000);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');
app.use(expressStatusMonitor());
app.use(compression());
app.use(sass({
src: path.join(__dirname, 'public'),
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"express": "^4.14.0",
"express-flash": "^0.0.2",
"express-session": "^1.14.1",
"express-status-monitor": "^0.1.4",
"express-validator": "^2.20.8",
"fbgraph": "^1.3.0",
"github": "^3.1.0",
Expand Down
2 changes: 2 additions & 0 deletions views/partials/header.pug
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
a(href='/api') API Examples
li(class=(title == 'Contact') ? 'active' : undefined)
a(href='/contact') Contact
li
a(href='/status') Status
ul.nav.navbar-nav.navbar-right
if !user
li(class=(title == 'Login') ? 'active' : undefined)
Expand Down

0 comments on commit f5b98a8

Please sign in to comment.