forewoman

Node.js port of foreman + hot code reloading

Forewoman

Forewoman is a Node.js port of foreman, with the added feature of hot code reloading. Credits to node-supervisor for inspiring the hot code reloading implementation.

Forewoman is extracted from the code base of Notifymode

Forewoman should work on Linux, Mac OS and other variants of Unix. Windows is not supported.

You can install locally

npm install forewoman

or globally

npm install -g forewoman

If you choose to install locally, you have to invoke the full path to the forewoman command.

./node_modules/forewoman/bin/forewoman

If it is a global install, forewoman should be available from your PATH.

Use v0.2.x for Node v0.6.x. Use the latest for Node v0.8.x.

forewoman start [OPTION]

forewoman start is used to run your application directly from the command line.

If no additional parameters are passed, forewoman will run one instance of each type of process defined in your Procfile. The format of a Procfile is explained here

If a parameter is passed, forewoman will run one instance of the specified application type.

The following options control how the application is run:

Specify the number of each process type to run. The value passed in should be in the format process=num,process=num

Specify one or more .env files to load

Specify an alternate application root. This defaults to the directory containing the Procfile.

Specify an alternate Procfile to load, implies -d at the Procfile root.

Specify which port to use as the base for this application. Should be a multiple of 1000.

Specify the files to watch. If the files are modified, forewoman will restart the process. The value passed in should be in the format process=/path/to/file,process=/path/to/file

forewoman export <format> <location> [OPTION]

forewoman export is used to export your application to another process management format

An location to export must be passed as an argument.

  • runit
  • upstart
  • inittab
  • supervisord
  • monit (coming)

Use this name rather than the application's root directory name as the name of the application when exporting.

Specify the number of each process type to run. The value passed in should be in the format process=num,process=num

Specify the directory to place process logs in.

Specify which port to use as the base for this application. Should be a multiple of 1000.

Specify the user the application should be run as. Defaults to the app name

Specify an alternate template to use for creating export files. Read the templates directory for examples. Specify your option by template_name=/path/to/template. Eg. runit's log_run.mustache can be replaced by "log_run=/path/to/alt.mustache" The templates should be a Mustache template

Specify an alternate application root. This defaults to the directory containing the Procfile.

Specify an alternate environment file. You can specify more than one file by using: --env file1,file2.

Specify an alternate location for the application's Procfile. This file's containing directory will be assumed to be the root directory of the application.

Copyright (c) 2012 Wong Liang Zan. MIT License