From the course: Learning the Angular CLI

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Customizing the development server

Customizing the development server - Angular Tutorial

From the course: Learning the Angular CLI

Start my 1-month free trial

Customizing the development server

- [Instructor] There are other options available to you as you serve your application. If for some reason you need to use a port other than 4200, we can customize that by using a configuration flag. In our terminal, let's type in ng serve --port=8000 --open. We can use this option, if you will like the development server to be at port 8000 and once that is compiled and ready to go, we will see our browser open our local host, port 8000. Now this was just an arbitrary port. Any open port would work here. Sometimes you may need to run your development server from a domain that is not local host. Perhaps your application and API configuration needs to have a specific domain or there are other domain specific actions that are taken. Say for instance, you need to run your app @localhost.def.company.com port 4200. This is an arbitrary domain but note that it includes company.com in the domain, something that may…

Contents