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-23 21:54:47 +04:00
|
|
|
var configLoader = require('./core/config-loader.js'),
|
|
|
|
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';
|
|
|
|
|
|
|
|
configLoader.loadConfig().then(function () {
|
|
|
|
var ghost = require('./core/server');
|
|
|
|
ghost();
|
|
|
|
}).otherwise(errors.logAndThrowError);
|