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