diff --git a/lib/cylon.js b/lib/cylon.js index 54b8711..ca35d1e 100644 --- a/lib/cylon.js +++ b/lib/cylon.js @@ -91,10 +91,12 @@ var Cylon = (function() { // // Returns the API configuration Master.prototype.api = function(opts) { - if (opts == null) { opts = {}; } + if (opts == null) { opts = {} }; - this.api_config.host = opts.host || "127.0.0.1"; - this.api_config.port = opts.port || "3000"; + var host = opts.host || this.api_config.host, + port = opts.port || this.api_config.port; + + this.api_config = { host: host, port: port }; return this.api_config; };