Reputation: 1532
I am confused on how to host the app. I made it with the cli. DO I just take the dist folder and push it to my hosting service (go daddy)? What are the steps? I cannot find the steps that I need to upload my app.
Upvotes: 1
Views: 1427
Reputation: 669
npm install --global surge
# cd to dist folder and, just run…
$ surge
Surge - surge.sh
email: [email protected]
token: *****************
(first time it will ask for password, make sure you have a account on surge.sh)
project path: I:\Code\myangular2app\dist\
size: 33 files, 11.0 MB
domain: auto-generated.surge.sh
*(delete auto-generated name and put a unique one)*
upload: [====================] 100%, eta: 0.0s
propagate on CDN: [====================] 100%
plan: Free
users: [email protected]
IP Address: 45.55.110.124
Success! Project is published and running at unique-name.surge.sh
Upvotes: 1
Reputation: 28600
1- ng build --prod
2- Copy dist
3- Upload to your web server
4- Point your webserver to dist/index.html
Upvotes: 6