вот примерный конфиг nginx
server {
location /api {
proxy_pass
localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /{
proxy_pass
localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
попробуй запустить через pm2
example:
pm2 start npm --name client -- start
pm2 start npm --name server -- start
и не забудь обновить nginx