Reputation: 2726
When trying to build the Angular application and starts a web server using the command (os: Ubuntu):
ng serve --port 80
The following error shown:
Port 80 is already in use. Use '--port' to specify a different port.
Upvotes: 0
Views: 2251
Reputation: 2726
The error message is misleading. Actually, ports below 1048 needs root privileges.
On Linux (like Ubuntu), one of the ways to be able to use port 80, is to use sudo as follows:
sudo ng serve --port 80
Upvotes: 6