How To Deploy Angular 2 App On Github For Free








At First Install angular-cli ghpages


npm install -g angular-cli-ghpages
 
 
After installing next step is linking your repository. Run this command
 
ng build --prod --base-href "https://<user-name>.github.io/<repo>/" 
 
If You See Error Then ommit --prod and Run This Command
 
 
ng build --base-href "https://<user-name>.github.io/<repo>/" 
 
 
You can now see a dist folder in your angular 2 app directory. 
Upload all files of dist folder on github repository. 
Then From Settings Enable Github Pages. A link will be provided to you.
That's It.

Demo : https://shawon100.github.io/angularmaterial/
 
 
 

Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment