clients want bws version for logging and debugging

This commit is contained in:
Gregg Zigler 2015-09-15 09:28:08 -07:00
parent b7c1f96c94
commit 9a8c467a01
2 changed files with 8 additions and 0 deletions

View File

@ -415,6 +415,12 @@ ExpressApp.prototype.start = function(opts, cb) {
});
});
router.get('/v1/version/', function(req, res) {
var server = getServer(req, res);
res.json( { version: server.version } );
res.end();
});
this.app.use(opts.basePath || '/bws/api', router);
WalletService.initialize(opts, cb);

View File

@ -15,6 +15,7 @@ var Address = Bitcore.Address;
var ClientError = require('./errors/clienterror');
var Errors = require('./errors/errordefinitions');
var Package = require('../package');
var Utils = require('./utils');
var Lock = require('./lock');
@ -49,6 +50,7 @@ function WalletService() {
this.blockchainExplorerOpts = blockchainExplorerOpts;
this.messageBroker = messageBroker;
this.notifyTicker = 0;
this.version = Package.version;
};