Prepare Angular App for Production Release
If you don't ship it, it never happened. In the previous chapter, you created a local weather application that can retrieve current weather data. You have created some amount of value; however, if you don't put your app on the web, you end up creating zero value. Delivering something is difficult, delivering something to production is even more difficult. You want to follow a strategy that results in a reliable, high quality, and flexible release.
The app we created in Chapter 2, , is fragile, has failing unit and end-to-end (e2e) tests, and emits console errors. We need to fix the unit tests and harden the application by intentionally introducing errors so that you can see the side-effects of real-life conditions in action using debugging tools. We also need to be able to deliver the frontend app separately from the backend app, which is a very important decoupling to retain the flexibility of being able to push separate app and server updates. In addition, decoupling will ensure that as the various tools and technologies in your application stack inevitably falls out of support or favor, you will be able to replace your frontend or backend without a full rewrite of your system.
In this chapter, you will learn to do the following:
- Run Angular unit and e2e
- Troubleshoot common Angular errors using Chrome Developer Tools
- Guard against null data
- Containerize the app using Docker
- Deploy the app on the web using Zeit Now
Required software is as listed:
- Docker Community Edition Version 17.12
- Zeit Now Account