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

A Crude Debug Mode For a Dockerized NestJS App

[!CAUTION]

Why I say crude? Because you need to write debugger and cannot use breakpoints :/.

  1. Create a Dockerfile as we did here.

    https://github.com/kasir-barati/nestjs-materials/blob/5155bff1fca4fccb4e66bc19e8472c44b19b20e9/docker/vscode-dev-mode/Dockerfile#L1-L19

  2. Create and expose 9229 port in your compose file, see here.

    https://github.com/kasir-barati/nestjs-materials/blob/5155bff1fca4fccb4e66bc19e8472c44b19b20e9/docker/vscode-dev-mode/compose.yml#L1-L12

  3. Create launch.json.

    https://github.com/kasir-barati/nestjs-materials/blob/5155bff1fca4fccb4e66bc19e8472c44b19b20e9/.vscode/launch.json#L1-L18