NodeJS Microservices based on microservice-nodejs-lib
Microservices list:
- Authentication
- Authorization
- Blog
- Configuration
- Content
- Cron
- Files
- Gateway
- Notification
- Payment-stripe
- Users
Use CLI to start your own art.
How to investigate it
Method 1:
Use docker to run all in one command:
docker-compose -f docker-compose.yml -f docker-compose.ms.yml up
Method 2
- Run
Inverted Json
job server andpostgres
database.docker-compose up
- Run
configuration
microservice.- Through docker:
docker-compose -f docker-compose.ms.yml up configuration
- Through node:
cd microservices/configuration npm i npm run start:dev
- Through docker:
- Run other needed microservices (the same actions as in step 2).
That is all. Check it:
curl -X POST http://127.0.0.1:3000
-H 'Content-Type: application/json'
-d '{"id":"unique-id-1","method":"microservice-name.method","params":{}}'
see example requests in http-requests
folder
Check all available microservices
Microservices also available like npm packages:
npm i --save @lomray/microservice-NAME
# for e.g.
npm i --save @lomray/microservice-configuration
Integration tests
- Run all microservices
- Run commands:
cd tests npm run test