2013-11-25 22:22:59 -05:00
|
|
|
// # Ghost bootloader
|
|
|
|
// Orchestrates the loading of Ghost
|
|
|
|
// When run from command line.
|
|
|
|
|
2014-08-17 01:17:23 -05:00
|
|
|
var bootstrap = require('./bootstrap'),
|
2014-08-13 16:58:12 -05:00
|
|
|
server = require('./server');
|
2013-11-25 22:22:59 -05:00
|
|
|
|
|
|
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
|
|
|
|
2014-08-19 11:36:46 -05:00
|
|
|
function makeGhost(options) {
|
2014-02-08 10:41:15 -05:00
|
|
|
options = options || {};
|
2014-02-19 22:22:02 -05:00
|
|
|
|
2014-08-17 01:17:23 -05:00
|
|
|
return bootstrap(options.config).then(function () {
|
|
|
|
return server(options.app);
|
|
|
|
});
|
2013-11-25 22:22:59 -05:00
|
|
|
}
|
|
|
|
|
2014-08-19 11:36:46 -05:00
|
|
|
module.exports = makeGhost;
|