title: next() call in express-ws module in nodejs
body: <p>I came across a sample code for my webserver using express-ws for reliable Websocket connection between my server and client browser. The code will start listening in port 3000 for websocket connection.</p>
  
  <pre><code>var express = require('express');
  var app = express();
  var expressWs = require('express-ws')(app);
  
  app.use(function (req, res, next) {
      console.log('middleware');
      req.testing = 'testing';
      return next();
  });
  
  app.get('/', function(req, res, next){
    console.log('get route', req.testing);
    res.end();
  });
  
  app.ws('/', function(ws, req) {
    ws.on('message', function(msg) {
      console.log(msg);
    });
    console.log('socket', req.testing);
  });
  
  server.listen(3000);
  </code></pre>
  
  <p>what is the use of next() API in express-websocket?</p>