diff options
| author | Adam Soltys <[email protected]> | 2021-05-12 23:19:24 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-05-12 23:19:24 -0400 |
| commit | 7d6d6ca74f1f271427c271382fff49446aaa1895 (patch) | |
| tree | f88a0c115dc1d3262b7006405b207de9fd72265a /lib | |
| parent | 6be7b95a73ce0a666f7cda1425f13ddf741ca172 (diff) | |
| download | coinos-server-7d6d6ca74f1f271427c271382fff49446aaa1895.tar.gz coinos-server-7d6d6ca74f1f271427c271382fff49446aaa1895.zip | |
rates endpoint
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rates.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rates.js b/lib/rates.js index fdb7f5ac..b9e889fb 100644 --- a/lib/rates.js +++ b/lib/rates.js @@ -44,6 +44,11 @@ let fetchRates; setTimeout(fetchRates, 7200000); })(); +app.get('/rates', + ah(async (req, res, next) => { + res.send(app.get("rates")); + })); + setInterval(() => { broadcast("rate", app.get("last")); }, 1000); |
