2013-09-06 19:54:50 +04:00
|
|
|
// # Ghost bootloader
|
|
|
|
// Orchestrates the loading of Ghost
|
2013-11-20 06:43:55 +04:00
|
|
|
// When run from command line.
|
2013-09-06 19:54:50 +04:00
|
|
|
|
2013-11-20 17:58:52 +04:00
|
|
|
var configLoader = require('./core/server/config/loader'),
|
|
|
|
errors = require('./core/server/errorHandling');
|
2013-08-06 23:27:56 +04:00
|
|
|
|
2013-11-23 21:54:47 +04:00
|
|
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
|
|
|
|
2013-11-20 17:58:52 +04:00
|
|
|
configLoader().then(function () {
|
2013-11-23 21:54:47 +04:00
|
|
|
var ghost = require('./core/server');
|
|
|
|
ghost();
|
|
|
|
}).otherwise(errors.logAndThrowError);
|