start(cwd, environment) {
        const childProcess = require('child_process');
        const errors = require('../errors');

        // Check that content folder is owned by the current user
        if (!this._checkContentFolder(cwd)) {
            return Promise.reject(new errors.SystemError(`The content folder is not owned by the current user.
Ensure the content folder has correct permissions and try again.`));
        }

        return new Promise((resolve, reject) => {
            let errorBuffer = '';

            const cp = childProcess.spawn('node', [process.argv[1] , 'run'], {
                cwd: cwd,
                detached: true,
                stdio: ['ignore', 'ignore', 'pipe', 'ipc'],
                env: Object.assign({}, process.env, {NODE_ENV: environment})
            });

            // Stick the pid into the pidfile so we can stop the process later
            fs.writeFileSync(path.join(cwd, PID_FILE), cp.pid.toString());

            cp.stderr.on('data', (data) => {
                errorBuffer += data.toString();
            });

            cp.on('error', (error) => {
                reject(new errors.CliError({
                    message: 'An error occurred while starting Ghost.',
                    err: error
                }));
            });

            cp.on('exit', (code) => {
                fs.removeSync(path.join(cwd, PID_FILE));
                // If something was written to stderr, log in because it will
                // give the user some clues about what went wrong
                if (errorBuffer) {
                    return reject(new errors.GhostError('\n' + errorBuffer));
                }

                reject(new errors.GhostError(`Ghost process exited with code: ${code}`));
            });

            // Wait until Ghost tells us that it's started correctly, then resolve
            cp.on('message', (msg) => {
                if (msg.error) {
                    fs.removeSync(path.join(cwd, PID_FILE));
                    return reject(new errors.GhostError(msg.message));
                }

                /* istanbul ignore else */
                if (msg.started) {
                    // Destroying the stream allows the parent process to exit
                    // since there are no more active listeners
                    cp.stderr.destroy();

                    cp.disconnect();
                    cp.unref();
                    return resolve();
                }
            });
        });
    }
Starts the local process

@param {string} cwd CWD of the ghost instance
@param {string} environment Current running environment
@return Promise<void>

@method start
@public