Build a metric logging and reporting service that sums metrics by time window for the most recent hour.
npm test
- Clone repository
- Install all dependencies with
npm i - Fire up the server with
npm start
Live server is can be accessed at https://metlog.herokuapp.com ;
BASE URL:
/api/v1
Saves record under specified
keyand deletes it after one hour
- Endpoint:
/metric/key - Method:
POST - Body:
{
"value": "100"
}- Response:
{}Gets the sum of all records under a specified
keyin the last hour
- Endpoint:
/metric/key/sum - Method:
GET - Response:
100
#🥂