ethan0905 / ft_transcendence

Wiki with step-by-step explained strategy on how to: create app (front+back+infra), 42auth, 2FA and more..
2 stars 0 forks source link

hot reload for backend nestjs #14

Closed ethan0905 closed 1 year ago

ethan0905 commented 1 year ago

Files are updated well inside the docker container, but the new requests to the back cannot be found. Looking to work on a hot reload, similar to the one for the frontend service.

ethan0905 commented 1 year ago

In order to implement this service, you must: 1- Go to your docker-compose.yml file, create a volume for your backend files. Then, go to the backend service and add the 9229 port for debbuging mode.

  backend:
    container_name: backend_nestjs
    [...]
    ports:
      [...]
      # debugging port
      - 9229:9229
      [...]

2- Instead of starting the backend using npm start, you must use npm run start:debug 3- Enjoy your hot reload !

external links: https://www.youtube.com/watch?v=CLqlCkvAKKQ