Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
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

Running and testing our first microservice

We’re not going to write any unit or integrate tests in this chapter. In Chapter 11, where we’ll dive into the details of those topics. For this chapter, we’ll do manual testing via Postman. To run our application, follow these steps:

  1. Download Ch05 from our GitHub repository.
  2. Open the project (Ch05) via Visual Studio Code.
  3. Go to Terminal | New Terminal.
  4. Run the npm install command from the Ch05 folder to load the required packages.
  5. Change directories to src (using the cd src command).
  6. Run the node index.js command. Mongo should be installed before you run this command. Check out Chapter 4 for more information about the installation process for Mongo.
  7. Open Postman.

In the next few subsections, we’ll test our endpoints one by one.

Creating a new account

To create a new account, follow these steps:

  1. Create a new tab in Postman.
  2. Select POST from HTTP verbs.
  3. ...
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