Skip to content

dsngroup/service-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

service-proxy

Registration, logging and reporting service's status.

Execution

npm run start

Current functionalities

  • GET /: welcome message.
  • GET /inventory: query all stored inventories.
  • POST /inventory: post an inventory description.
  • POST /startAll: start all services' logging.
  • POST /start/:id: dynamic route for start only one service, id = name+protocol+uri.

Example post inventory description:

curl -X POST http://localhost:3000/inventory -d @test-resource/sample-inventory.json --header "Content-Type: application/json"

Example start:

curl -X POST http://localhost:3000/start

See test-resource/sample-inventory.json for json schema definition.

Project layout

  • index.js: entry point of node http server and db related tooling.
  • inventory.js: model of inventory, a.k.a service-related metadata.
  • inventory-store.js: adapt with sqlite for storing inventory data.
  • service.js: abstraction of a service.
  • service-store.js: in-memory store for enabled services.

About

Registration, logging and reporting service's status.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published