clients want bws version for logging and debugging
This commit is contained in:
parent
b7c1f96c94
commit
9a8c467a01
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue