Testing our microservices together
We should run transaction and account microservices together to test producing and consuming processes. First, let’s start with the account microservice. As mentioned before, don’t forget to run the docker-compose.yml
files for both services.
To test the newly updated account, follow these steps:
- Navigate to
Ch07/accountservice/src
from the terminal. - Run the account service from the command line using the
node
index.js
command. - Open Postman and, from the new tab, paste the service URL (it is
http://localhost:3001/v1/accounts
for us), and for the HTTP method, selectPOST
. Select Body | raw, change Text to JSON, and paste the following:{ "name":"AccName1", "number":"Ac12345", "type":"root", "status":"new" }
You should get the following response...