I've been trying to research Nginx to configure a proxy with Angular 5 ng serve on localhost:4200, however only come up with results for serving a project that's been built. The configuration I've found from this research "somewhat" works, but results in a white page that isn't loading any data:
dev:12 GET http://192.168.1.84/inline.bundle.js net::ERR_ABORTED
dev:12 GET http://192.168.1.84/polyfills.bundle.js net::ERR_ABORTED
dev:12 GET http://192.168.1.84/styles.bundle.js net::ERR_ABORTED
dev:12 GET http://192.168.1.84/vendor.bundle.js net::ERR_ABORTED
dev:12 GET http://192.168.1.84/main.bundle.js net::ERR_ABORTED
It appears that it can't see the files served by ng serve, but is at least reaching the index.html page for the project. This is the configuration I am currently using:
location /dev {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
rewrite ^/(.*)$ /$1 break;
proxy_set_header Host localhost;
proxy_pass http://localhost:4200;
}
What should I add to the /dev config?