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
key
and deletes it after one hour
- Endpoint:
/metric/
key
- Method:
POST
- Body:
{
"value": "100"
}
- Response:
{}
Gets the sum of all records under a specified
key
in the last hour
- Endpoint:
/metric/
key
/sum
- Method:
GET
- Response:
100
#🥂