如何執行
# 方法1
foreman start
# 方法2
foreman s# 只執行指定 PROCESS
foreman start [PROCESS]
# 範例
foreman start web# 檔名不想取 Procfile,需指定檔案才能執行
foreman start -f file
# 範例 (檔名為 hello)
foreman start -f hello
增加 Foreman 前,需開 4 個視窗啟動
增加 Foreman 後,只需啟動 foreman start
更多指令
foreman -h
Commands:
foreman check # Validate your application's Procfile
foreman export FORMAT LOCATION # Export the application to another process management format
foreman help [COMMAND] # Describe available commands or one specific command
foreman run COMMAND [ARGS...] # Run a command using your application's environment
foreman start [PROCESS] # Start the application (or a specific PROCESS)
foreman version # Display Foreman gem versionOptions:
-f, [--procfile=PROCFILE] # Default: Procfile
-d, [--root=ROOT] # Default: Procfile directory
小結
Foreman 是蠻好用的工具,當有多個要啟動時,挺有感的,且突然忘記某個啟動指令怎輸入的話,還能看下 Procfile
檔案
鐵人賽文章連結:https://ithelp.ithome.com.tw/articles/10247491
medium 文章連結:https://link.medium.com/bWT6dLpueab
本文同步發布於 小菜的 Blog https://riverye.com/
備註:之後文章修改更新,以個人部落格為主