Auto-restarting code upon changes
In the previous section, we showed you how we can massively reduce friction by volume mapping the source code folder in the container, thus avoiding having to rebuild the container image and rerun the container over and over again. Yet we still feel some remaining friction. The application running inside the container does not automatically restart when a code change is made. Thus, we have to manually stop and restart the container to pick up these new changes.
In this section, we will learn how we can containerize our applications written in various languages, such as Node.js, Java, Python, and .NET, and have them restart automatically whenever a code change is detected. Let’s start with Node.js.
Auto-restarting for Node.js
If you have been coding for a while, you will certainly have heard about helpful tools that can run your applications and restart them automatically whenever they discover a change in the code base. For Node.js...