NestJS materials

Write an awesome doc for NestJS tips, tricks, notes, things which are not in the doc (or are but not really obvious) and experimented to figure them out and use them.

View on GitHub

MockServer

Infographic of MockServer

For each request received the following steps happen: first. find matching expectation and perform action. If no matching expectation proxy request if it is configured to act like a proxy request. Otherwise return 404

With MockServer we can:

Proxying

We are doing this for integration and e2e tests.

[!IMPORTANT]

HTTP client should send requests to the MockServer. Not the actual service.

GUI

You can see logs, active expectations, requests received, proxied requests in the dashboard. Open this address in your browser: localhost:1081/mockserver/dashboard

SSL

MockServer can present a valid X.509 Certificates for any hostname.

Compose

services:
  mockserver:
    image: mockserver/mockserver:5.15.0
    restart: on-failure:3
    ports:
      - 1081:1080

Read more