Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion versioned_docs/version-4.0.0/quickstart/samples-node-mongo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'

<InstallationGuide/>
Expand Down Expand Up @@ -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.
Expand Down