diff --git a/bitcore-node/index.js b/bitcore-node/index.js index a9bfa70..d5598f3 100644 --- a/bitcore-node/index.js +++ b/bitcore-node/index.js @@ -6,6 +6,13 @@ var fs = require('fs'); var InsightUI = function(options) { BaseService.call(this, options); + this.routePrefix = options.routePrefix; + if (typeof options.apiPrefix !== 'undefined') { + this.apiPrefix = options.apiPrefix; + } else { + this.apiPrefix = 'insight-api'; + } + }; InsightUI.dependencies = ['insight-api']; @@ -18,7 +25,11 @@ InsightUI.prototype.start = function(callback) { }; InsightUI.prototype.getRoutePrefix = function() { - return 'insight'; + if (typeof this.routePrefix !== 'undefined') { + return this.routePrefix; + } else { + return 'insight'; + } }; InsightUI.prototype.setupRoutes = function(app, express) { @@ -38,9 +49,9 @@ InsightUI.prototype.setupRoutes = function(app, express) { InsightUI.prototype.filterIndexHTML = function(data) { var transformed = data - .replace(/ - insight + insight