title: Socket.io path on server side (Node.js) and client side (Angular)
body: <p>I have socket.io working locally. <code>http://localhost:3000</code> is URL for Node.js backend and <code>http://localhost:4200</code> URL for frontend Angular.</p>
  
  <p>But it does not work when I deploy the app.</p>
  
  <p>Folder structure:</p>
  
  <p><strong>parent-folder-name</strong></p>
  
  <pre><code> -backend folder
  
   -frontend files
  </code></pre>
  
  <p>All files of Angular located directly in the parent folder.</p>
  
  <p>URLs:</p>
  
  <p><code>http://mydomainnameexample.com/parent-folder-name/backend</code>
  <code>http://mydomainnameexample.com/parent-folder-name/</code> (frontend)</p>
  
  <p>Code:</p>
  
  <p>Client: <code>this.socket = io('http://mydomainnameexample.com/parent-folder-name/');</code></p>
  
  <p>Server side:</p>
  
  <pre><code>const http = require('http').Server(app);
  const io = require('socket.io')(http);
  io.sockets.on('connection', function(socket) {
    console.log('A client is connected!');
  
    socket.on('index', () =&gt; {
      console.log('socketData: ');
      testController.index(socket);
    });
  });
  </code></pre>
  
  <p>I do have <code>404</code> in the console for this URL:
  <code>http://mydomainnameexample.com/parent-folder-name/backend/?EIO=3&amp;transport=polling&amp;t=MQnDIEb</code></p>