Project is hosted on Digital Ocean.
On the client side, its throwing a 404 error
GET http://134.209.147.204/socket.io/?EIO=3&transport=polling&t=NKKWF-X //404
Here is the nginx config file
server {
listen 80;
root /var/www/html;
location / {
proxy_pass http://127.0.0.1:5000; (where the frontend is running)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /socket/ {
proxy_pass http://localhost:3001; (where the sockets.io server is running)
}
}
Frontend
socket = io('/socket/')
Both the frontend and backend runs without any errors and can be accessed from the browser.