Closed D4nte closed 5 years ago
Something that was not explicitly said is how do we intend to do the "webserver configuration"
To me, we do a Apache or nginx configuration that serves the HTML file containing the link and does the redirect.
To me, we do a Apache or nginx configuration that serves the HTML file containing the link and does the redirect.
Way simpler. Bobtimus is written in node, so why not just use expressjs: https://expressjs.com/en/starter/hello-world.html
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => res.send('comit+web....'))
app.listen(port, () => console.log(`Bobtimus listening on port ${port}!`))
Can you do redirect with expressJS?
expressJS yap:
app.get("/latestrate", (req, res) => {
res.status(301).redirect("https://www.google.com")
})
Proposed addition: Show a Bitcoin and Ether address at http://<bobtimus_ip/
to allow people to fund Bobtimus if a balance is too low.
Proposed addition: Show a Bitcoin and Ether address at http://<bobtimus_ip/ to allow people to fund Bobtimus if a balance is too low.
I would not reveal that Bobtimus is running low, that could just motivate people to misuse poor Bob. Instead, I would just statically say: Please donate some testnet BTC to bc1... and robsten ETH to 0x1337
Let's block this for now and discuss if and how we want to do it.
Let's block this for now and discuss if and how we want to do it.
When are we going to discuss it?
The express client will be created in the index.js
- there we have the TradeEvaluationService
- but it currently only exposes isTradeAcceptable
. calculateAmountsToPublish
is currently only implemented in TestnetMarketMaker
.
Assumption:
TradeEvaluationService
should contain calculateAmountsToPublish
, because it should not matter which rate-strategy is used, bobtimus should always be able to publish the rate if requested.
Proposal:
TradeEvaluationService
to TradeService
calculateAmountsToPublish
to TradeService
express
object to be created at the end of the main async function which handles the shoot
)bobtimus_url/rates
which returns the rates for all configured ledger-asset combinations of bobtimus (response as defined in makeshift
).@bonomat @D4nte please let me know if that matches with your thoughts :)
Bobtimus should expose a HTTP API to return the latest rates.
A proposal of the JSON payload is present in https://github.com/coblox/makeshift/pull/2
You would need to use the
TestnetMarketMaker.getAmountsToPublish()
method to access some of the information to publish.