1

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.

2 Answers 2

6
1- ng build --prod
2- Copy dist 
3- Upload to your web server
4- Point your webserver to dist/index.html
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, this was a big help
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.