From 94c03c76c8756d6347dad48a2a58c2326efd38b4 Mon Sep 17 00:00:00 2001 From: Aniket Date: Fri, 4 Dec 2026 18:41:45 +0530 Subject: [PATCH] docs: fix the Node.js MongoDB quickstart Correct the delete example's URL, and add the missing steps to start MongoDB and set MONGODB_URL. Signed-off-by: Aniket --- .../version-4.0.0/quickstart/samples-node-mongo.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/versioned_docs/version-4.0.0/quickstart/samples-node-mongo.md b/versioned_docs/version-4.0.0/quickstart/samples-node-mongo.md index a15285a9e..d0d1b0c84 100644 --- a/versioned_docs/version-4.0.0/quickstart/samples-node-mongo.md +++ b/versioned_docs/version-4.0.0/quickstart/samples-node-mongo.md @@ -72,6 +72,18 @@ git clone https://github.com/keploy/samples-typescript && cd samples-typescript/ npm install ``` +Start MongoDB: + +```bash +docker run -d --name mongo -p 27017:27017 mongo +``` + +In the `express-mongodb` folder, create a `.env` file with the MongoDB connection string: + +```bash +MONGODB_URL=mongodb://127.0.0.1:27017/products +``` + import InstallationGuide from '../concepts/installation.md' @@ -144,7 +156,7 @@ curl --location --request PUT 'http://localhost:3000/api/products/:id' \ **_DELETE REQUEST_** ```bash -curl --location --request DELETE 'http://localhost:8080/potions/:id' +curl --location --request DELETE 'http://localhost:3000/api/products/:id' ``` 🎉 Easy right! Just one API call and you've whipped up a test case with a mock. Check out the Keploy directory to find your shiny new `test-1.yml` and `mocks.yml` files.