Yes, server.js needs to be running, your nginx config will look like this:

server {
listen 80;
server_name my-domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name my-domain.com;
ssl_certificate /etc/letsencrypt/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/privkey.pem;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types *;
location ~* \.(css|js|eot|svg|ttf|woff|woff2|ico|png|jpg|json)$ {
root /usr/share/nginx/html/my-project/dist/browser;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:4000/;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}
}

)

    Éverton Roberto Auler

    Written by

    Developer/Entrepreneur

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade