Skip to content

nuelsoft/metric_logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metric Logger

Task

Build a metric logging and reporting service that sums metrics by time window for the most recent hour.

Test

npm test

Setup

  • Clone repository
  • Install all dependencies with npm i
  • Fire up the server with npm start

To use the Live server

Live server is can be accessed at https://metlog.herokuapp.com ;

Points 🚀

BASE URL: /api/v1

Log

Saves record under specified key and deletes it after one hour

  • Endpoint: /metric/key
  • Method: POST
  • Body:
{
  "value": "100"
}
  • Response:
{}

Get Sum

Gets the sum of all records under a specified key in the last hour

  • Endpoint: /metric/key/sum
  • Method: GET
  • Response:
100

#🥂

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published