docker-typescript-debug icon indicating copy to clipboard operation
docker-typescript-debug copied to clipboard

🐞 Example for Debugging Node.js + Typescript Running inside Docker Containers with Hot Reload


Docker Typescript Debugging

Example for Debugging Node.js + Typescript Running inside Docker Containers with Hot Reload

Watch the YouTube Tutorial

Features

  • Node.js + TypeScript app
  • Runs in Docker container
  • With hot reload
  • Ability to debug with VSCode
  • Multiple applications
  • A shared library

Usage

Recommended OS: Linux

Requirements: Yarn, Docker, Docker Compose

Setup

  • yarn install

Development

  • make dev or yarn dev (Start development backend services, http://localhost:3000)
  • Ctrl+F5 (Start debugging and choose which container to debug)

Codebase

  • app1.ts simple Node.js server
  • app2.ts another simple Node.js server

Important files

  • docker-compose.yml backend development environment
  • package.json contains nodemon configuration for hot reload
  • .vscode/launch.json launch configuration for debuggers

Credits

Icons made by Freepik from www.flaticon.com