User API#start instead of API#listen in cylon#api
This commit is contained in:
parent
cfd37e9621
commit
3d2842567b
|
@ -85,8 +85,6 @@ Cylon.api = function api(Server, opts) {
|
|||
if (_.isString(Server)) {
|
||||
var req = "cylon-api-" + Server;
|
||||
|
||||
opts.name = Server;
|
||||
|
||||
try {
|
||||
Server = require(req);
|
||||
} catch (e) {
|
||||
|
@ -116,7 +114,7 @@ Cylon.api = function api(Server, opts) {
|
|||
opts.mcp = this;
|
||||
var instance = new Server(opts);
|
||||
this.apiInstances.push(instance);
|
||||
instance.listen();
|
||||
instance.start();
|
||||
};
|
||||
|
||||
// Public: Starts up the API and the robots
|
||||
|
|
Loading…
Reference in New Issue