Ghost/index.js
Harry Wolff 469aaa398c Add jscs task to grunt file and clean up files to adhere to jscs rules.
resolves #1920

- updates all files to conform to style settings.
2014-09-17 21:44:29 -04:00

20 lines
620 B
JavaScript

// # Ghost bootloader
// Orchestrates the loading of Ghost
// When run from command line.
var express = require('express'),
ghost = require('./core'),
errors = require('./core/server/errors'),
// Create our parent express app instance.
server = express();
ghost().then(function (instance) {
// Mount our ghost instance on our desired subdirectory path if it exists.
server.use(instance.config.paths.subdir, instance.app);
// Let ghost handle starting our server instance.
instance.start(server);
}).catch(function (err) {
errors.logErrorAndExit(err, err.context, err.help);
});