[Fixed] Using LiveServer on port 8080


I’m currently working through the Angular 2 QuickStart instructions at https://angular.io/docs/js/latest/quickstart.html and have run into a problem running LiveServer. When I start LiveServer as per the instructions, I get an error in my brower:

Error Code: 502 Proxy Error

I’ve realised with a bit of investigation that my proxy is using port 8080 and so is LiveServer. If I turn my proxy off, then I can see the angular site in my browser.

So, my question is, what is the best port to change LiveServer to use?


I found the answer to my question in the live-server README file (which I probably should have read before posting the question) which says:

If a file ~/.live-server.json exists it will be loaded and used as default options for live-server on the command line

So, for the benefit of anyone else who needs to do this, I’ve created a .liver-server.json file and set the port to 8081 like this:

{"port": 8181, 
"host": "", 
"open": false, 
"ignore": "",
"file": "index.html",
"wait": 1000 }

This has worked.

Leave a Reply

(*) Required, Your email will not be published