How to run Angular-CLI project on Apache php localhost: 8888, not -prod version

I am new to Angular 2 and I am trying to run an Angular-CLI project on Apache php localhost: 8888 , but I cannot seem to get it done. I start ng service, but it starts on localhost: 4200, I put all my files in htdogs directory , change all html files to php (index.php) but still can't start the project. I can start Angular project when I do it with npm start and with system.config.server.js. Please help me:)

+3


source to share


1 answer


Run the following command in terminal:

ng serve --port 8888

This will order the lighttpd webserver which uses angular cli to serve on the specified port 8888.



You can also use shorthand -p

.


You can read about this and learn more about using the cli in the official documentation .

0


source







All Articles