You need to set up environment variables as described in 'Configuration' sections in the docs below before running these commands.
cd ./service-registry && npm i && npm run startcd ./cacher && npm i && npm run startcd ./demo-service && npm i && npm run startcd ./web-portal && npm i && npm run start
Web app contains information about currently running services:
You can register a service using 'Register Service' form:
You can view list of running services using 'Services List' table:
You can grab info about specific service using 'Get Service' form:
'Service Version' input there can contain any semantic version value (for example, for a 2.0.4 version we can simply put 2 into the textbox).
Service Registry is placed under ./service-registry folder.
Endpoints map to the forms showed in the web app:
PUT /register/:serviceName/:serviceVersion/:servicePort/:serviceIp?DELETE /unregister/:serviceName/:serviceVersion/:servicePort/:serviceIp?GET /find/allGET /find/:serviceName/:serviceVersion
Services are cleaned up after 30 seconds being not registered again.
You need to set NODE_ENV and PORT env variables. For example:
NODE_ENV=development
PORT=3000
Cacher is used for caching endpoints in case Service Registry is unavailable. You may send requests directly to Cacher port (using Service Registry API), it will handle requests to the Service Registry by itself.
Cacher is placed under ./cacher folder.
You need to set NODE_ENV, PORT and SERVICE_REGISTRY_URL env variables. For example:
NODE_ENV=development
PORT=3003
SERVICE_REGISTRY_URL=http://localhost:3000
It's just used for demonstration purposes. It makes request to the Service Registry to register/unregister itself.
Demo Service is placed under ./demo-service folder.
You need to set NODE_ENV and SERVICE_REGISTRY_HOST env variables. For example:
NODE_ENV=development
SERVICE_REGISTRY_HOST=http://localhost:3000
Contains API visualisation. Makes requests to the Cacher to register/get/unregister services.
Wep App is placed under ./web-portal folder.
You need to set REACT_APP_API_HOST env variable. For example:
REACT_APP_API_HOST=http://localhost:3003/



