Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
/ 03_storage Public archive

Nodejs app that can store metrics to a LevelDB-database, using express. Communicates mainly through postman.

Notifications You must be signed in to change notification settings

Detzy/03_storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"# 03_storage"

Contributors

Eirik Solheim Ølberg [email protected]

Using the project:

  • You will launch the nodejs script with npm start. It defaults to local port 8080.
  • Most of the features are not interresting in a browser, but rather through Postman actions.

Saving metrics

The purpose of the project is to be able to save to local storage, and we do this throug saving metrics. To do so, use a Postman post action, with url localhost:8080/metrics/ and Body on format: [ { "key":"1384686660000", "value":"10" } ]

Request all metrics

With a Postman get request to url localhost:8080/metrics/, you will get all metrics stored. This also prints all metrics to the console, which is helpful as it includes the keys, so you can use them for "Requesting one metric" or "Deleting metric"

Request one metric

With a Postman get request to url localhost:8080/metrics/:id, you will get only metrics with the key :id. Note, the metrics are stored with the format: metric:${theKeyYouInputed}${m.timestamp} See console after "Request all" for possible keys

Delete metric

With a Postman delete request to url localhost:8080/metrics/:id, you will delete only metric with the key :id. Note, the metrics are stored with the format: metric:${theKeyYouInputed}${m.timestamp} See console after "Request all" for possible keys

About

Nodejs app that can store metrics to a LevelDB-database, using express. Communicates mainly through postman.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published