Supe > Getting Started
The first key change is making the entry point of your program a supervisor instance.
For example, if your program is currently started by running node server.js
, you can:
- Create a new entry point file, like
node app.js
. - Make
app.js
a supervisor.
// inside app.js
var supervisor = require('supe')();
- Register (and run) the previous entry point as a Supe citizen of
app.js
.
// inside app.js
var server = supervisor.start( 'server', 'server.js' );