Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Microservices with JavaScript

You're reading from   Hands-On Microservices with JavaScript Build scalable web applications with JavaScript, Node.js, and Docker

Arrow left icon
Product type Paperback
Published in Dec 2024
Publisher Packt
ISBN-13 9781788625401
Length 406 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Tural Suleymani Tural Suleymani
Author Profile Icon Tural Suleymani
Tural Suleymani
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1:Fundamentals of Microservices Architecture
2. Chapter 1: Introduction to Microservices FREE CHAPTER 3. Chapter 2: Diving into Microservices Internals 4. Chapter 3: What Do You Need Before Getting Started? 5. Chapter 4: Stack Development Technologies 6. Part 2:Building and Managing Microservices
7. Chapter 5: Basic CRUD Microservices 8. Chapter 6: Synchronous Microservices 9. Chapter 7: Asynchronous Microservices 10. Chapter 8: Real-Time Data Streaming Using Microservices 11. Part 3:Securing, Testing, and Deploying Microservices
12. Chapter 9: Securing Microservices 13. Chapter 10: Monitoring Microservices 14. Chapter 11: Microservices Architecture 15. Chapter 12: Testing Microservices 16. Chapter 13: A CI/CD Pipeline for Your Microservices 17. Index 18. Other Books You May Enjoy

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:

  1. Navigate to Ch07/accountservice/src from the terminal.
  2. Run the account service from the command line using the node index.js command.
  3. 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, select POST. 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image