diff --git a/README b/README.md similarity index 56% rename from README rename to README.md index 867efdb..77218a6 100644 --- a/README +++ b/README.md @@ -1,3 +1,4 @@ + # What This project shows a live feed of events happening on the Livepeer BondingManager smart contract. This way it is able to track: - (De)activations of Orchestrators on the Livepeer network @@ -34,48 +35,53 @@ Orchestrators can be inspected by clicking on their address, showing all of thei ## Frontend The frontend can be used on it's own as a basis for hosting your own Orchestrator website -By default the website will forward all API requests to http://localhost:42609 + +### Running Standalone +By default the website will forward all API requests to `http://localhost:42609` Meaning, it will look for the backend at the same place where the website is running! -If you want to run this frontend without running your own backend, you have to configure it to always pull it's data from the existing API at https://nframe.nl/ -Modify package.json to do this -- Edit the line containing "proxy": "http://localhost:42609" and replace "http://localhost:42609" with "http://localhost:42609" +If you want to run this frontend without running your own backend, you have to configure it to always pull it's data from the existing API at `https://nframe.nl/` +Modify `package.json` to do this +- Edit the line containing `"proxy": "http://localhost:42609"` and replace `"http://localhost:42609"` with `"https://nframe.nl/"` ## Dependencies nginx, certbot, certbot-nginx, npm ### HTTPS using nginx -- replace /etc/nginx/nginx.conf with supplied one, certbot will upgrade it to HTTPS -- systemctl enable --now nginx.service -- certbot --nginx +replace `/etc/nginx/nginx.conf` with supplied one, certbot will upgrade it to HTTPS +- `systemctl enable --now nginx.service` +- `certbot --nginx` ## Initial Config Download copy of repository and change directory to it -- git clone https://github.com/stronk-dev/LivepeerEvents.git /var/www -- cd /var/www -Download all external dependencies we are using -- npm install +- `git clone https://github.com/stronk-dev/LivepeerEvents.git /var/www` +- `cd /var/www` -Edit default Orchestrator Address +Download all external dependencies we are using +- `npm install` + +### Edit default Orchestrator Address If you are not running your own backend, by default the backend will return my Orchestrator In order to show your own Orchestrator on the Grafana page, you need to edit src/util/livepeer.js Edit the line containing: -export const getCurrentOrchestratorInfo = () => ( - fetch("api/livepeer/getOrchestrator", { - method: "GET", - headers: { - "Content-Type": "application/json" - } - }) -); -And change this to (replace with your own address): -export const getCurrentOrchestratorInfo = () => ( - fetch("api/livepeer/getOrchestrator/0x847791cbf03be716a7fe9dc8c9affe17bd49ae5e", { - method: "GET", - headers: { - "Content-Type": "application/json" - } - }) -); + + export const getCurrentOrchestratorInfo = () => ( + fetch("api/livepeer/getOrchestrator", { + method: "GET", + headers: { + "Content-Type": "application/json" + } + }) + ); + And change this to (replace with your own address): + + export const getCurrentOrchestratorInfo = () => ( + fetch("api/livepeer/getOrchestrator/0x847791cbf03be716a7fe9dc8c9affe17bd49ae5e", { + method: "GET", + headers: { + "Content-Type": "application/json" + } + }) + ); All Grafana panels point towards where I am hosting my own Grafana dashboard. You need to edit this to pull the panels from your own Grafana instance For each panel you want to replace: @@ -84,19 +90,21 @@ For each panel you want to replace: - Open the Embed tab - Copy the entire Embed HTML bit - Edit src/grafana.js: -- Replace any