Simplify local development by defining the processes involved in a new Procfile.dev. This file is compatible with several process managers such as foreman, invoker and node-foreman.
Some considerations worth noting:
I looked into the possibility of using the existing Procfile for both production and development. This would've required adding intelligence to startup scripts such as bin/webpack-dev-server so that they would no-op in production. Turned out to be more complicated because foreman interprets any early process exit as an error and aborts all processes.
I chose not to introduce a convenience script such as bin/serve for a few reasons:
I didn't want to assume/prescribe a specific process manager such as foreman.
It's easy for engineers to create a shell alias or git-ignored script with their preferred process manager and startup options.
As such, while this Procfile.dev hopefully simplifies initial setup for a new contributor, i see its primary purpose as defining the processes involved more so than prescribing a canonical way of invoking them.
Simplify local development by defining the processes involved in a new
Procfile.dev
. This file is compatible with several process managers such as foreman, invoker and node-foreman.Some considerations worth noting:
Procfile
for both production and development. This would've required adding intelligence to startup scripts such asbin/webpack-dev-server
so that they would no-op in production. Turned out to be more complicated becauseforeman
interprets any early process exit as an error and aborts all processes.bin/serve
for a few reasons:foreman
.As such, while this
Procfile.dev
hopefully simplifies initial setup for a new contributor, i see its primary purpose as defining the processes involved more so than prescribing a canonical way of invoking them.