diff --git a/backend/src/index.ts b/backend/src/index.ts index d66c535f0..ffb23bfaa 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -81,6 +81,7 @@ class Server { .get(config.API_ENDPOINT + 'statistics/3m', routes.get3MStatistics.bind(routes)) .get(config.API_ENDPOINT + 'statistics/6m', routes.get6MStatistics.bind(routes)) .get(config.API_ENDPOINT + 'statistics/1y', routes.get1YStatistics.bind(routes)) + .get(config.API_ENDPOINT + 'backend-info', routes.getBackendInfo) ; } } diff --git a/backend/src/routes.ts b/backend/src/routes.ts index 2b225c96a..397a9ce02 100644 --- a/backend/src/routes.ts +++ b/backend/src/routes.ts @@ -2,6 +2,7 @@ import statistics from './api/statistics'; import feeApi from './api/fee-api'; import mempoolBlocks from './api/mempool-blocks'; import mempool from './api/mempool'; +import * as os from 'os'; class Routes { private cache = {}; @@ -73,6 +74,12 @@ class Routes { const times = mempool.getFirstSeenForTransactions(txIds); res.send(times); } + + public getBackendInfo(req, res) { + res.send({ + 'hostname': os.hostname(), + }); + } } export default new Routes();