strapi/lib/start.js

33 lines
505 B
JavaScript
Raw Normal View History

2015-10-01 00:30:16 +02:00
'use strict';
/**
* Module dependencies
*/
// Public node modules.
const async = require('async');
/**
* `Strapi.prototype.start()`
*
* Loads the application, then starts all attached servers.
*
* @api public
*/
module.exports = function start(configOverride, cb) {
const self = this;
// Callback is optional.
cb = cb || function (err) {
if (err) {
2015-12-02 11:22:13 +01:00
return self.log.error(err);
2015-10-01 00:30:16 +02:00
}
};
async.series([
cb => self.load(configOverride, cb),
this.initialize
]);
2015-10-01 00:30:16 +02:00
};