- Heroku Cloud Application Development
- Anubhav Hanjura
- 243字
- 2021-08-20 17:55:05
Running applications locally
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:

Since the Procfile has both web and worker processes, foreman will start one of each process type with the output interleaved on your terminal. Your web process uses port 5000, because this is what foreman provides as a default in the $PORT environment variable. The web process must use this value, since it is used by the Heroku platform on deployment as well. You can test the application now. Press Ctrl + C to send a signal to close down the application when it is done.
- Ansible權(quán)威指南
- Linux性能優(yōu)化
- 嵌入式Linux應(yīng)用開發(fā)菜鳥進(jìn)階
- STM32庫開發(fā)實(shí)戰(zhàn)指南:基于STM32F4
- AutoCAD 2014中文版從入門到精通
- 從實(shí)踐中學(xué)習(xí)Kali Linux無線網(wǎng)絡(luò)滲透測試
- Kali Linux高級(jí)滲透測試
- Raspberry Pi入門指南
- Microsoft Hyper-V Cluster Design
- OpenSolaris紅寶書
- 樹莓派+傳感器:創(chuàng)建智能交互項(xiàng)目的實(shí)用方法、工具及最佳實(shí)踐
- Docker for Developers
- 物聯(lián)網(wǎng)操作系統(tǒng)AliOS Things探索與實(shí)踐
- Linux應(yīng)用大全 服務(wù)器架設(shè)
- Windows 10入門與提高