proctor
~ Watch over your javascripts.
Proctor lets you watch over your javascript file with a function as an export. For instance(and as a real-world example), I can have a server file like this:
// server.jsvar http = ; var server = http; exports { server; console;};
Notice that this file only exports a startServer
function,
so it is impossible to develop with something like forever
.
Instead, I can use Proctor:
// run.jsvar Proctor = ; var runner = file: 'server.js' fn: 'startServer' restart: true config: port: 3333 ; runnerstart;
Now when I run node run.js
, Proctor will spin up a separate child process in which to run my file,
and reload it automatically when it is changed.
This is perfect for build system support, especially if you're developing a web app.