title: Setup peerJS server combined with express
body: <p>I'm trying to setup my own peerJS server following the readme on  <a href="https://github.com/peers/peerjs-server#combining-with-existing-express-app" rel="nofollow">https://github.com/peers/peerjs-server#combining-with-existing-express-app</a></p>
  
  <p>my code on server</p>
  
  <pre><code>port = process.env.PORT or 8080
  http = require 'http'
  express = require 'express'
  app = express()
  server = http.createServer app
  app.use '/peerjs', ExpressPeerServer server, debug : on
  server.listen port
  server.listen 9000
  </code></pre>
  
  <p>my code on client</p>
  
  <pre><code>peer = new Peer
      host : 'localhost'
      port : 9000
      secure : no
      config :
          iceServers : [ url : 'stun:stun.l.google.com:19302' ]
  </code></pre>
  
  <p>I get this error on client console</p>
  
  <pre><code>GET http://localhost:9000/peerjs/peerjs/id?ts=14150106969530.4679094860330224 net::ERR_CONNECTION_REFUSED
  </code></pre>