0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【個人備忘】Herokuのproduction用のDyno Typeの設定について

Posted at

【前提】
HerokuのDyno TypeにはWebとWorkerが存在する。ざっくりとした認識は以下の通り。

 Web→リクエストが飛んできたら起動する。最後のリクエストから30分でスリープする。
 Worker→能動的に落とさない限り常時起動している。

production用のアプリケーションでは、Procfileをプロジェクトのルートディレクトリに配置して、web/worker dynoの起動コマンドを記述してやる必要がある。
どちらのDyno Typeを使用するかによって、どちらかを準備すればいい。

Procfile
web npm start
Procfile
worker npm start
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?