// # Ghost Startup
// Orchestrates the startup of Ghost when run from command line.
var express,
    ghost,
    parentApp,
    errors;

// Make sure dependencies are installed and file system permissions are correct.
require('./core/server/utils/startup-check').check();

// Proceed with startup
express = require('express');
ghost = require('./core');
errors = require('./core/server/errors');
newrelic = require('newrelic');

// Create our parent express app instance.
parentApp = express();

// Call Ghost to get an instance of GhostServer
ghost().then(function (ghostServer) {
    // Mount our Ghost instance on our desired subdirectory path if it exists.
    parentApp.use(ghostServer.config.paths.subdir, ghostServer.rootApp);

    // Let Ghost handle starting our server instance.
    ghostServer.start(parentApp);
}).catch(function (err) {
    errors.logErrorAndExit(err, err.context, err.help);
});

@@ -1,8 +1,65 @@
+// New relic monitoring%0Anewrelic = require('newrelic');%0A%0A
 // # Gho
@@ -69,16 +69,16 @@
 Startup%0A
-
 // Orche
@@ -267,16 +267,17 @@
 orrect.%0A
+%0A
 require(
@@ -404,16 +404,16 @@
 core');%0A
+
 errors =
@@ -449,40 +449,8 @@
 s');
-%0Anewrelic = require('newrelic');
 %0A%0A//

Increase new relic priority in loading.