Browse Source

fix: Backend debugger not working since migrating to ts-node-dev

Owen Diffey 2 years ago
parent
commit
8e1bf72828
2 changed files with 2 additions and 2 deletions
  1. 1 1
      backend/entrypoint.sh
  2. 1 1
      backend/package.json

+ 1 - 1
backend/entrypoint.sh

@@ -8,7 +8,7 @@ if [[ "${CONTAINER_MODE}" == "dev" ]]; then
 fi
 
 if [[ "${BACKEND_DEBUG}" == "true" ]]; then
-    export INSPECT_BRK="--inspect-brk=0.0.0.0"
+    export INSPECT_BRK="--inspect-brk=0.0.0.0:${BACKEND_DEBUG_PORT:-9229}"
 else
     export INSPECT_BRK=""
 fi

+ 1 - 1
backend/package.json

@@ -9,7 +9,7 @@
 	"license": "GPL-3.0",
 	"repository": "https://github.com/Musare/Musare",
 	"scripts": {
-		"dev": "NODE_OPTIONS=${INSPECT_BRK} ts-node-dev -i --transpile-only ./src/main.ts",
+		"dev": "ts-node-dev -i --transpile-only ${INSPECT_BRK} ./src/main.ts",
 		"build": "tsc",
 		"prod": "node build/src/main.js",
 		"lint": "eslint . --ext .js,.ts",