Browse Source

Add debug port support for the results (node) app

Michael Irwin 1 year ago
parent
commit
6286b6cf25
2 changed files with 22 additions and 2 deletions
  1. 20 0
      .vscode/launch.json
  2. 2 2
      docker-compose.yml

+ 20 - 0
.vscode/launch.json

@@ -0,0 +1,20 @@
+{
+  // Use IntelliSense to learn about possible attributes.
+  // Hover to view descriptions of existing attributes.
+  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+  "version": "0.2.0",
+  "configurations": [
+    {
+      "name": "Note: Results debugger",
+      "type": "node",
+      "request": "attach",
+      "port": 9229,
+      "address": "localhost",
+      "skipFiles": [
+        "<node_internals>/**"
+      ],
+      "remoteRoot": "/app",
+      "localRoot": "${workspaceFolder}/result"
+    }
+  ]
+}

+ 2 - 2
docker-compose.yml

@@ -27,7 +27,7 @@ services:
   result:
     build: ./result
     # use nodemon rather than node for local dev
-    entrypoint: nodemon server.js
+    entrypoint: nodemon --inspect-brk=0.0.0.0 server.js
     depends_on:
       db:
         condition: service_healthy 
@@ -35,7 +35,7 @@ services:
       - ./result:/app
     ports:
       - "5001:80"
-      - "5858:5858"
+      - "9229:9229"
     networks:
       - front-tier
       - back-tier