diff --git a/.gitignore b/.gitignore index 0b3d4df..13ebc50 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ ### Visual Studio Code ### .vscode +# Except launch.json +!.vscode/launch.json ### Node ### # Logs diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7cef77f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Docker: Attach to Node", + "type": "node", + "request": "attach", + "restart": true, + "port": 9229, + "address": "localhost", + "localRoot": "${workspaceFolder}", + "remoteRoot": "/app", + "protocol": "inspector" + } + ] + } \ No newline at end of file diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 2723d1e..1cd2328 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -2,4 +2,6 @@ version: "3.7" services: bot: - command: sh -c "npm install && npm run dev" \ No newline at end of file + command: sh -c "npm install && npm run dev" + ports: + - "9229:9229" \ No newline at end of file diff --git a/package.json b/package.json index 325c17b..2163d3e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "dev": "nodemon index.js" + "dev": "nodemon --inspect=0.0.0.0:9229 index.js" }, "author": "", "license": "ISC",