At just about any stage of your application development, you likely wonder when people can start using what you’ve built. The eagerness is justified. Luckily, you have many ways to get your application online. Deploying an application is one of the most daunting tasks for new developers building web applications. Part of the struggle is understanding the resources and services that assist with deployment. The deployment process is much more than uploading your application code somewhere, at least during your first attempt. If done correctly, making changes in a production application can be simple. Some problems with making changes in your production application include running into restrictions that limit the database content that you can modify, accidentally removing code used to verify incoming data, and making changes in your local environment that don’t work in your production environment, such as configuration changes.
In this unit, you set up your application to deploy on Heroku, a cloud service that hosts and runs your application for you. First, you prepare your application’s configuration files to ensure that functionality will work locally and in production. Then you follow a few steps to launch your application on Heroku and set up your MongoDB database. After a short lesson, you’ll have your recipe application running under a URL that you can share with family and friends. In a subsequent lesson, you explore ways to improve your code for future refinement. I talk about linting your code, a process used to identify inefficient code with the help of an external package. At the end of the unit, you’ll get a chance to apply unit and integration testing to your code. These tests provide fundamental protection against accidentally breaking your code in the future. You install the mocha and chai packages to help set up tests for Express.js actions and routes.
This unit covers the following topics:
Lesson 37 (the capstone lesson) walks through using the deployment steps you learned in this unit to deploy the Confetti Cuisine application.