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