How often have we faced issues in the production environment that fail to reproduce in the development environment? Hence, it is critical that when developing and debugging an application, the code in a local development environment is executed in the same manner as the remote environment. This ensures that any differences between the two environments and bugs that hard to find are intercepted before deploying the code to production.
In a local development environment, you can run a small-scale version of your application by launching one process for each of the two process types: web and worker.
Foreman is a command-line tool used to run Procfile-based applications locally. It is installed automatically by the Heroku toolbelt (Heroku client package), and is also available as a gem.
If you don't have foreman installed, use the gem install foreman
command to install it from the prompt.
Starting foreman is easy as shown in the following screenshot: