"use strict";

var cp = require("child_process");
var join = require("path").join;
var production = process.env.NODE_ENV === "production" ? true : false;

module.exports = function (path, shutdownMessage) {
    path = join(__dirname, "..", path);
    var job = production ?
        cp.fork(path) :
        cp.fork(join(__dirname, "..", "node_modules", "nodemon"), [path], {
            cwd: __dirname
        });

    job.on("message", function (message) {
        console.log(message);
    }).on("exit", function () {
        console.log(shutdownMessage);
    });

    return job;
};


@@ -148,16 +148,69 @@
 false;%0A%0A
+//fork a child process depending on the environment%0A%0A
 module.e

add description for spawn