UNPKG

insight-bitcore-api

Version:

An open-source bitcoin blockchain API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.

27 lines (21 loc) 499 B
'use strict'; var config = require('../../config/config'); var _getVersion = function() { var pjson = require('../../package.json'); return pjson.version; }; exports.render = function(req, res) { if (config.publicPath) { return res.sendfile(config.publicPath + '/index.html'); } else { var version = _getVersion(); res.send('insight API v' + version); } }; exports.version = function(req, res) { var version = _getVersion(); res.json({ version: version }); };