mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 18:52:14 +03:00
17 lines
467 B
JavaScript
17 lines
467 B
JavaScript
|
// # Ghost bootloader
|
||
|
// Orchestrates the loading of Ghost
|
||
|
// When run from command line.
|
||
|
|
||
|
var config = require('./server/config'),
|
||
|
errors = require('./server/errorHandling');
|
||
|
|
||
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||
|
|
||
|
function startGhost(app) {
|
||
|
config.load().then(function () {
|
||
|
var ghost = require('./server');
|
||
|
ghost(app);
|
||
|
}).otherwise(errors.logAndThrowError);
|
||
|
}
|
||
|
|
||
|
module.exports = startGhost;
|