Rumes Shyaman
Rumes Shyaman

Reputation: 1082

Angular 2 Project hosting

I created angular 2 app using angularcli and now I need to check it in the live server my question is,

1. do I have export whole project or what are the option I have?.
2. Can we run it in apache 2 server or we need to use specific server?. 

Upvotes: 2

Views: 117

Answers (2)

Martin
Martin

Reputation: 16300

Yes, there is no need to deploy the source code of your app. You can run the built object files under an Apache server.

ng build --prod or ng build --prod --aot will build your project into the dist folder. Simply deploy the content of the dist folder to your Apache server.

Upvotes: 3

Divyanshu Maithani
Divyanshu Maithani

Reputation: 15036

You can run the app simply using:

ng serve

The app will start running at http://localhost:4200/. Specify custom host and port as:

ng serve --host 0.0.0.0 --port 4201

Upvotes: 0

Related Questions