2013-09-06 19:54:50 +04:00
|
|
|
// # Ghost bootloader
|
|
|
|
// Orchestrates the loading of Ghost
|
|
|
|
|
|
|
|
var configLoader = require('./core/config-loader.js'),
|
2013-09-24 14:46:30 +04:00
|
|
|
error = require('./core/server/errorHandling');
|
2013-08-06 23:27:56 +04:00
|
|
|
|
|
|
|
// If no env is set, default to development
|
2013-08-03 19:11:16 +04:00
|
|
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
2013-05-11 20:44:25 +04:00
|
|
|
|
2013-09-06 19:54:50 +04:00
|
|
|
configLoader.loadConfig().then(function () {
|
|
|
|
// The server and its dependencies require a populated config
|
|
|
|
require('./core/server');
|
|
|
|
}).otherwise(error.logAndThrowError);
|