Only require the API/Express when using it

Fixes an issue with the Tessel, which cannot load Express.
This commit is contained in:
Andrew Stewart 2014-06-18 14:44:46 -07:00
parent 587efe2fee
commit 856619e902
1 changed files with 3 additions and 2 deletions

View File

@ -10,8 +10,7 @@
var Async = require('async');
var API = require('./api'),
Logger = require('./logger'),
var Logger = require('./logger'),
Robot = require('./robot'),
Utils = require('./utils');
@ -60,6 +59,8 @@ Cylon.api = function api(opts) {
opts = {};
}
var API = require('./api');
this.api_instance = new API(opts);
this.api_instance.listen();
};