Skip to content

Commit

Permalink
Merge pull request #76 from openhoat/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
RafalWilinski authored Mar 5, 2017
2 parents 7652f89 + ccb6598 commit a81b438
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ const basic = auth.basic({realm: 'Monitor Area'}, function(user, pass, callback)
callback(user === 'username' && pass === 'password');
});

const statusMonitor = require('express-status-monitor')();
app.use(statusMonitor);
app.get('/status', auth.connect(basic), statusMonitor.pageRoute)
// Set '' to config path to avoid middleware serving the html page (path must be a string not equal to the wanted route)
const statusMonitor = require('express-status-monitor')({ path: '' });
app.use(statusMonitor.middleware); // use the "middleware only" property to manage websockets
app.get('/status', auth.connect(basic), statusMonitor.pageRoute); // use the pageRoute property to serve the dashboard html page
```

## Using module with socket.io in project
Expand Down

0 comments on commit a81b438

Please sign in to comment.