title: Javascript Websocket to listen on port 80
body: <p>I have a web server deployed in port <code>80</code> with Websocket running in its javascript. </p>
  
  <pre><code>var wsURL = ws://localhost:80/ws"
  wsConn = new WebSocket(wsURL);
  </code></pre>
  
  <p>But I keep getting this error:</p>
  
  <blockquote>
    <p>WebSocket connection to 'ws://localhost/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED</p>
  </blockquote>
  
  <p>I had no problem when I run this locally with port other than <code>80</code> but in production I need to use port <code>80</code> and keep getting this error.</p>
  
  <p>Is there anyway that I can make <code>WebSocket</code> work with port <code>80</code>?</p>