Skip to content

Commit 4cd89fb

Browse files
committed
Modified wiremock guide
1 parent 5099218 commit 4cd89fb

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

content/guides/use-case/wiremock.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Imagine you have both an API and a frontend app, and you want to test how the fr
1414
In this guide, you'll learn how to:
1515

1616
- Use Docker to launch up a WireMock container.
17-
- Set up a non-containerized Node app to route requests to the containerized WireMock.
18-
- Set up a non-containerized Node app to fetch data from the external AccuWeather API.
17+
- Use mock data in the local development without relying on an external API
18+
- Use a Live API in production to fetch real-time weather data from AccuWeather.
1919

2020
## Using WireMock with Docker
2121

@@ -91,18 +91,17 @@ Now that you have tried WireMock, let’s use it in development and testing. In
9191

9292
![Diagram showing the architecture of WireMock in development ](./images/wiremock-arch.webp)
9393

94-
- The API Request is sent from the Node.js backend to the External AccuWeather API, which then returns the API Response.
95-
- Alternatively, when using WireMock, a Mocked API Request is sent to the WireMock server, and a Mocked API Response is returned.
94+
- In development, the Node.js backend sends a request to WireMock instead of the actual AccuWeather API.
95+
- In production, it connects directly to the live AccuWeather API for real data.
9696

97+
## Use mock data in local development
9798

98-
## Set up a non-containerized Node app to route requests to a containerized WireMock
99-
100-
Let’s set up a non-containerized Node app to route requests to the WireMock container instead of the external AccuWeather API.
99+
Let’s set up a Node app to send requests to the WireMock container instead of the actual AccuWeather API.
101100

102101
### Prerequisite
103102

104103
- Install [Node and NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
105-
- Ensure that WireMock container is up and running. (created in the previous step).
104+
- Ensure that WireMock container is up and running. (as setup earlier).
106105

107106

108107
Follow the steps to setup a non-containerized Node application:
@@ -205,7 +204,7 @@ Follow the steps to setup a non-containerized Node application:
205204
> [!TIP]
206205
> Before you proceed to the next step, ensure that you stop the node application service.
207206

208-
## Set up a non-containerized Node app to fetch data from the external AccuWeather API
207+
## Use a Live API in production to fetch real-time weather data from AccuWeather.
209208

210209
To enhance your Node.js application with real-time weather data, you can seamlessly integrate the AccuWeather API. This section of the guide will walk you through the steps involved in setting up a non-containerized Node.js application and fetching weather information directly from the AccuWeather API.
211210

0 commit comments

Comments
 (0)