Below is an outline of the api the frontend will need in order to be a functional website:
Note that all endpoints begin with /web to denote routes made for the frontend.
Install dependencies with npm install.
Run this backend with node app.js.
-
/web/ping- Status: 200
- Response:
text/plain"pong"
-
/web/nodes- Status: 200
- Response:
application/jsonA JSON array detailing all nodes information
-
/web/node?id={node id}- Status: 200
- Request:
- Required: query string specifying node id
- Response:
application/jsonA JSON object detailing specified node
-
/web/alerts- Status: 200
- Response:
application/jsonA JSON array containing all alerts
-
/web/alert?id={alert id}- Status: 200
- Request:
- Required: query string specifying alert id
- Response:
application/jsonA JSON object detailing specified alert