Netlify is a great platform to build/deploy any kind of web applications (not just Angular).
It's very useful when you need to deploy your app fast and easy.
I found it handy to have demos or examples running when writing posts or when I need to have some coding working and live (not just local), but Netlify is not just for that, it is a very powerful platform.
We can deploy our Angular app following these steps:
1. Create your angular project on github (could also be on bitbucket/gitlab)
2. Log in into Netlify, look for your repo and setup the build options
3. Deploy the new web site created!
Let's start
1. Create you angular project on github (could also be on bitbucket/gitlab)
ng new my-angular-app
Create a repo on github and push your code.
2. Log in into Netlify, look for your repo and setup the build options
- Log in https://www.netlify.com/
- Clic on New site from Git
- Select Github as provider
- After authorization, we will see the list of available repositories to pick.
If my-angular-app
repo is not on the list, we need to provide access from github. (If you see your repo, you can skip this step).
Clic on the highlighted link "Configure the Netlify app on GitHub".
We will be redirected to github to look for our missing repository
-
As part of build options setup, this is what we need:
- build command: we build our code in prod mode
- publish directory: location of build files (UPDATE: add /browser to publish directory)
3. Deploy the new web site created
After clic on Deploy site, the first build is triggered and deploy is in progress
Finally, we have our site running
Let's go to the site list to see one we have just created
Clic on our site, and then on the url provided by Netlify
That's all! site deployed and running!
Conclusions
Netlify provides a lot of cool features and tools, this post is just to demo how to deploy fast with Angular but there is a lot more to work with.
Other Netlify features
- Custom domains
- Functions with AWS Lambda
- Identity
- Forms
- Large Media
- Split Testing
- Analytics
References
- github repo (nothing special here)
- Netlify site running: https://focused-bhaskara-dee416.netlify.app/
Top comments (1)
Thank you so much brother ts help me a lot