2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Ghost/index.js
Josh Vanderwillik 1438278ce4 Extract starting functionality into an exported class
closes #3789
- Create a GhostServer class to manage state
- index.js now calls start on the exported server
- Alter tests to expect a GhostServer instance
2014-08-21 17:04:39 -04:00

13 lines
302 B
JavaScript

// # Ghost bootloader
// Orchestrates the loading of Ghost
// When run from command line.
var ghost = require('./core'),
errors = require('./core/server/errors');
ghost().then(function (app) {
app.start();
}).catch(function (err) {
errors.logErrorAndExit(err, err.context, err.help);
});