A /heath route exists but it is a fake one in the sense you just know that the service is alive. Create a more sophisticated one :
[x] Be sure of the io. See #34
[x] Choose the protocol of communication between an administrator and its services: direct (sameProcess) or IPC (newProcess)
[x] Code it (see next paragrah)
[x] Update doc (ex. functionalities)
[x] Update tests
Code
Create requests/healthRequest.js which is the request part of the interface
Create responses/healthResponse.js which is the response part of the interface
Update apis/admin/1.0.0/index.js to handle the request and its parameters. This is where an interface is created (see simple/1.0.0). The interface is send to the administrator. The answer will be generated from the interface received in response to the request interface.
Update administrator/administrator.js to handle the interface. It will only send it to the serviceManager and wait for the answer
Update service/serviceManager.js to handle the interface. It will send the interface to each administered service (call to administeredService.computeRequest(request)) and wait for the answers.
Update each administered service to handle the interface (code computeRequest(request) for each one)
sameProcess : call to service.computeAdminRequest(request)
newProcess : send a message to the child process
Update service/service.js to handle the interface for each protocol. It reads the request interface and answers the response interface.
code service.computeAdminRequest()
find a place to code message reception and call to service.computeAdminRequest()
A /heath route exists but it is a fake one in the sense you just know that the service is alive. Create a more sophisticated one :
Code