1

I am trying to run an angular project in the server using centos. It is complied successfully but working in browse when I try with my ip and port number.

I have no idea with deploying in the server, i tried to research but couldn't find anything related to this.

I started the project with the below command

   ng serve --port 4000 --host 0.0.0.0 --disableHostCheck

I just need to view it in the browser just let me know if there is some solution like where i have to re-route it to correct port with some way or something

2 Answers2

0

let me give a brief note on your question.

As you said you are running an Angular project on CentOS. so, let me assume your CentOS IP address as (192.168.0.100).

and run Angular project with the following command

ng serve --host 192.168.0.100

and access the project through in your local network with 192.168.0.100:4200 in the browser.

Hope it will work for you !!

ram12393
  • 1,284
  • 3
  • 14
  • 29
0

Nothing was working so i took the production build of the angular with the below code.
ng build --prod

and pasted all the files inside the dist folder to the public_html folder on the server and it worked..