Skip to content

Commit

Permalink
check the server parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
capaj committed Aug 23, 2016
1 parent ba4cac9 commit 7b3f78d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ const gatherOsMetrics = (io, span) => {
const encoding = {encoding: 'utf8'}

const middlewareWrapper = (app, config) => {
if (!app.listen) {
throw new Error('First parameter must be an http server')
}
io = require('socket.io')(app)
Object.assign(defaultConfig, config)
config = defaultConfig
Expand Down

0 comments on commit 7b3f78d

Please # to comment.