5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

node.jsでプロセスの自動再起動【express4】

5
Last updated at Posted at 2014-11-13

nodeの起動スクリプトをデーモン化するツール

 forever、node-dev、supervisor などなど

 今回はその中のsupervisorを使用した。
 (環境はwindows7、フレームワークはexpress4を使用。)

● パッケージインストール

 $npm install -g supervisor

● 起動

$supervisor ./bin/www (express4.x)
$supervisor node app.js (express3.x)

● オプション

アップロードや書き込みなどで都度再起動してしまうので、監視するディレクトリやファイルをオプションで設定する必要があるみたい。

-i(--ignore)オプション (例 : $supervisor -i node-module ./bin/www )
-w(--watch)オプション

5
5
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
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?