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:
- Download
Ch05
from our GitHub repository. - Open the project (
Ch05
) via Visual Studio Code. - Go to Terminal | New Terminal.
- Run the
npm install
command from theCh05
folder to load the required packages. - Change directories to
src
(using thecd
src
command). - 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. - 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:
- Create a new tab in Postman.
- Select
POST
from HTTP verbs.
...