title: Socket.IO 404 works locally but not when deployed via Netlify
body: <p>Socket.IO works locally but not when deployed via Netlify
  Please excuse my code, i'm a newbie to node.js etc.</p>
  
  <p>This is the error I get:
  Failed to load resource: the server responded with a status of 404 ()    (socket.io, line 0)</p>
  
  <p>Client:</p>
  
  <pre><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.dev.js"&gt;&lt;/script&gt;
  function syncObj() { 
  var socket = io.connect() 
  socket.emit('sync', `${objId}`)}
  // Listen for events
  function syncComplete() {
  var socket = io.connect()
  socket.on('sync', function (data) {
  objId = data
  noti5()
  document.getElementById("note4").style.display = "none";
  document.getElementById("note6").style.display = "none";
  // What do do when sync is complete
  // Say Something
  // Refresh Screen
  })
  }
  
  //Server:
  const express = require('express');
  const opn = require('opn');
  const app = express();
  const port = 5000
  var socket = require('socket.io')
  const cors = require("cors")
  
  function allowCrossDomain(req, res, next) {
  res.header('Access-Control-Allow-Origin', '*')
  res.header('Access-Control-Allow-Methods', 'PUT, POST, PATCH,   DELETE, OPTIONS');
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With,   Content-Type, Accept");
  next()}
  app.use(allowCrossDomain)
  app.use(cors())
  app.use('/', express.static(__dirname + '/public'))
  
  var server = app.listen(port, function () {
  console.log('listening to request on port 5000');
  opn(`http://localhost:${port}`);
  });
  
  // Socket Setup
  var io = socket(server);
  io.on('connection', function (socket) {
  console.log('made socket connection', socket.id)
  
  socket.on("sync", function(data){
  io.sockets.emit('sync', data)
  })
  })
  </code></pre>
  
  <p>Worked perfectly locally. Please help.</p>