10
Going Live
In the previous chapter, we learned how to write tests for the Node.js and Vue.js
components for our application. We learned what technologies we can use for testing
MEVN applications.
In this chapter, we will learn about what Continuous Integration (CI) is, how it makes our
lives easier, and how we can deploy our application in Heroku.
Continuous integration
CI is a practice in the software development process where each member of the team is
makes continuous small changes in the code and integrates them back into the original
codebase. After each change, the developer pushes it to GitHub and the tests run
automatically in that change. This helps to check whether there are any bugs or issues in
the changed code.
Consider a scenario where multiple developers are working on the same application. Each
developer is working on a different feature on separate branches. They all build the features
and write the test code for the features they build. Everything is going well. Then when the
features are completed, they try to integrate all the features, and all of a sudden everything
breaks. The tests also fail and many bugs start to creep out.
If the application is small, it wouldn't be a very big deal because the bugs could be fixed
easily. But if it's a large project, then it would be very hard just to figure out what went
wrong, let alone fix it all. That is where CI originated.
CI came into practice to mitigate such risks while integrating software. The rule for CI is to
integrate early and often, which helps to identify the bugs and problems early in the
process of adding new functionalities to the existing codebase. So instead of waiting for the
completion of every component, CI encourages us to build the codebase and run the test
suites on every single change that is committed to the codebase.