/monero-price-webservice

a simple webservice providing the current monero price

Primary LanguageGo

monero-price-webservice

In this code, we make an HTTP request to the CoinMarketCap API to retrieve the Monero price, and then we parse the JSON response and extract the Monero price. We then parse the HTML template and render it with the Monero price, and write the resulting HTML to the response writer.

To run this code, you will need to save it in a file called "main.go" and run the command go run main.go. This will start the web server, and you can view the Monero price website by visiting http://localhost:8080 in your web browser.