Nodemon: --inspect ν”Œλž˜κ·Έλ‘œ λ‹€μ‹œ μ‹œμž‘μ΄ 포트 μ‚¬μš© 였λ₯˜λ‘œ μ‹€νŒ¨ν•¨

에 λ§Œλ“  2018λ…„ 05μ›” 14일  Β·  21μ½”λ©˜νŠΈ  Β·  좜처: remy/nodemon

  • nodemon -v : 1.17.4
  • node -v : v10.1.0
  • 운영 체제/터미널 ν™˜κ²½: Linux 버전 4.9.87-linuxkit-aufs(root@70f48253c8b4) (gcc 버전 6.4.0(Alpine 6.4.0) )
  • μ‹€ν–‰ν•œ λͺ…λ Ή: nodemon --expose-gc --inspect=0.0.0.0:9228 --legacy-watch --delay 250ms --watch webpack.config.js node_modules/.bin/webpack-dev-server --mode development --host 0.0.0.0 --port 80

μ˜ˆμƒλ˜λŠ” 행동

파일이 λ³€κ²½λ˜λ©΄ "ν˜„μž¬ μ‘μš© ν”„λ‘œκ·Έλž¨μ„ μ€‘μ§€ν•˜κ³  μ‘μš© ν”„λ‘œκ·Έλž¨μ˜ μƒˆ μΈμŠ€ν„΄μŠ€λ₯Ό μ‹œμž‘ν•˜μ‹­μ‹œμ˜€" 단계에 따라 λ…Έλ“œ μ‘μš© ν”„λ‘œκ·Έλž¨μ„ λ‹€μ‹œ μ‹œμž‘ν•΄μ•Ό ν•©λ‹ˆλ‹€.

μ‹€μ œ 행동

이전 μΈμŠ€ν„΄μŠ€κ°€ μ€‘μ§€λ˜κΈ° 전에 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ„ μ‹œμž‘ν•˜κ³  μžˆμœΌλ―€λ‘œ μ‹€νŒ¨ν•˜κ³  λ‹€μŒ 였λ₯˜κ°€ ν‘œμ‹œλ©λ‹ˆλ‹€.

[nodemon] starting `node --expose-gc --inspect=0.0.0.0:9228 node_modules/.bin/webpack-dev-server --mode development --host 0.0.0.0 --port 80 src/index.js`
Starting inspector on 0.0.0.0:9228 failed: address already in use
[nodemon] app crashed - waiting for file changes before starting...

κ°μ‹œλœ 파일이 λ³€κ²½λ˜λ©΄ λ‹€μ‹œ μ‹œμž‘λ˜κ³  μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μΈμŠ€ν„΄μŠ€λ₯Ό μ€‘μ§€ν•˜κΈ°μ— μΆ©λΆ„ν•œ μ‹œκ°„μ΄ 되기 λ•Œλ¬Έμ— μž‘λ™ν•©λ‹ˆλ‹€.

μž¬ν˜„ 단계

webpack-dev-server, babel 및 react둜 κ°„λ‹¨ν•œ ν”„λ‘œμ νŠΈλ₯Ό μ‹œμž‘ν•œ λ‹€μŒ λ°˜μ‘μ„ μ΄ˆκΈ°ν™”ν•˜λŠ” 더미 src/index.js λ₯Ό μΆ”κ°€ν•˜μ—¬ webpack-dev-server의 ν”„λ‘œμ„ΈμŠ€λ₯Ό μ•½κ°„ 느리게 λ§Œλ“­λ‹ˆλ‹€.
제곡된 λͺ…령을 μ‚¬μš©ν•˜μ—¬ nodemon을 μ‹œμž‘ν•©λ‹ˆλ‹€.
μ‹€ν–‰: touch webpack.config.js 컴퓨터가 λ‹€μŒμ„ μ‹œμž‘ν•˜κΈ° 전에 μΈμŠ€ν„΄μŠ€λ₯Ό 쀑지할 만큼 μΆ©λΆ„νžˆ λΉ λ₯΄μ§€ μ•ŠμœΌλ©΄ μ‹€νŒ¨ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

μ œμ•ˆ

--inspector ν”Œλž˜κ·Έκ°€ nodemon 에 좔가될 λ•Œ μ‹œκ°„ 초과 λ˜λŠ” 간격을 μ‚¬μš©ν•˜μ—¬ μƒˆ μΈμŠ€ν„΄μŠ€λ₯Ό μ‹œμž‘ν•˜κΈ° 전에 PIDκ°€ μž‘λ™ν•˜μ§€ μ•ŠλŠ”μ§€ ν™•μΈν•˜μ—¬ μƒˆ μΈμŠ€ν„΄μŠ€λ₯Ό μ‹œμž‘ν•˜κΈ° 전에 λͺ¨λ“  λ¦¬μ†ŒμŠ€λ₯Ό μ‚¬μš©ν•  수 μžˆλŠ”μ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€.


ν•΄λ‹Ήν•˜λŠ” 경우 λͺ…령에 --dump ν”Œλž˜κ·Έλ₯Ό μΆ”κ°€ν•˜κ³  여기에 좜λ ₯을 ν¬ν•¨ν•˜μ—¬ λ―Όκ°ν•œ/개인 μ„ΈλΆ€ 정보 λ˜λŠ” 토큰을 μ œκ±°ν•˜λ„λ‘ ν•˜μ‹­μ‹œμ˜€ .

needs more info

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

λ™μΌν•œ λ¬Έμ œκ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.
# 1050μ—μ„œ λ‚˜λŠ” κ·Έ 의견 의 ν•΄κ²° 방법을 μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€.

nodemon --delay 80ms --exec 'fuser -k 56745/tcp; node --inspect=0.0.0.0:56745 ./app/http.js'

킬 포트 λ₯Ό 퓨저 둜 ꡐ체

λͺ¨λ“  21 λŒ“κΈ€

λ³΅μ œν•  git repoλ₯Ό μ œκ³΅ν•˜μ„Έμš”. λ‚˜λŠ” νŒ¨ν‚€μ§€ ꡬ성을 μΆ”μΈ‘ν•˜μ§€ μ•Šμ„ κ²ƒμž…λ‹ˆλ‹€ (그리고 μ„±κ³΅μ μœΌλ‘œ nodemon으둜 검사λ₯Ό μ‚¬μš©ν–ˆκΈ° λ•Œλ¬Έμ— ꡬ성이 μ œκ°€ μΆ”κ΅¬ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€).

λ˜ν•œ μ œμ•ˆ 사항이 있으면 μž‘λ™ν•˜λŠ” ν…ŒμŠ€νŠΈμ™€ ν•¨κ»˜ PR을 μ œκ³΅ν•˜λŠ” 것이 κ°€μž₯ μ’‹μŠ΅λ‹ˆλ‹€. 그것은 μ ˆλŒ€μ μœΌλ‘œ πŸ‘

이λ₯Ό μž¬ν˜„ν•˜λŠ” 데 μ‚¬μš©ν•  수 μžˆλŠ” 격리된 ν”„λ‘œμ νŠΈλ₯Ό λ§Œλ“€ 수 μžˆλŠ” 방법을 생각할 κ²ƒμž…λ‹ˆλ‹€. ν•˜μ§€λ§Œ 맀우 μ–΄λ €μš΄ κ²ƒμ²˜λŸΌ λ³΄μž…λ‹ˆλ‹€. μ—¬κΈ°μ—μ„œλŠ” 앱을 μ‹€ν–‰ν•˜κΈ° μœ„ν•΄ λ‚΄ μ»΄ν“¨ν„°μ—μ„œ μ‚¬μš© κ°€λŠ₯ν•œ λ¦¬μ†ŒμŠ€λ₯Ό 쀄일 수 있기 λ•Œλ¬Έμ— 도컀 μ»¨ν…Œμ΄λ„ˆ λ‚΄λΆ€μ—μ„œ μž¬ν˜„ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

μ•„λ§ˆλ„ ν”„λ‘œμ νŠΈλ₯Ό 직접 디버깅할 수 μžˆμ„ κ²ƒμž…λ‹ˆλ‹€(그리고 문제λ₯Ό μΌμœΌν‚€λŠ” ν”„λ‘œμ νŠΈμ— νŠΉλ³„ν•œ 것이 μžˆλ‹€κ³  μƒκ°ν•˜μ§€λ§Œ λ‹€λ₯Έ μ‚¬λžŒλ“€μ΄ λ§‰μ—°ν•˜κ²Œ μœ μ‚¬ν•œ 것을 λ³΄μ•˜μ§€λ§Œ κ²°μ½” λ³΅μ œν•  수 μ—†λ‹€λŠ” 것을 μ•Œκ³  μžˆμŠ΅λ‹ˆλ‹€).

λ˜ν•œ DEBUG=nodemon* λ₯Ό μ‚¬μš©ν•˜μ—¬ μΆ”κ°€ 정보λ₯Ό 얻을 수 있으며, ν•„μš”ν•œ 경우 디버그 릴리슀λ₯Ό μˆ˜ν–‰ν•˜μ—¬ 문제의 원인을 νŒŒμ•…ν•  수 μžˆμŠ΅λ‹ˆλ‹€( kill run.js 파일)

Docker μ»¨ν…Œμ΄λ„ˆ λ‚΄μ—μ„œ nodemon을 μ‚¬μš©ν•˜λŠ” λ™μ•ˆμ—λ„ 이 였λ₯˜κ°€ λ¬΄μž‘μœ„λ‘œ ν‘œμ‹œλ©λ‹ˆλ‹€. 였λ₯˜λŠ” μ™„μ „νžˆ μž„μ˜μ μ΄λ©° μž¬ν˜„ μ‹œλ‚˜λ¦¬μ˜€λ₯Ό λ§Œλ“€ 수 μ—†μŠ΅λ‹ˆλ‹€.

μ»¨ν…Œμ΄λ„ˆ 내뢀에 DEBUG=nodemon* envλ₯Ό μΆ”κ°€ν•˜λ €κ³  μ‹œλ„ν•œ λ‹€μŒ 였λ₯˜λ₯Ό μˆ˜μ‹ ν•  λ•ŒκΉŒμ§€ λͺ‡ 번 λ‹€μ‹œ μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€.

λ‹€μŒμ€ 성곡적인 μž¬μ‹œμž‘μ˜ λ‘œκ·Έμž…λ‹ˆλ‹€.

my_container_1           | Thu, 24 May 2018 15:30:32 GMT nodemon bus emit: restart
my_container_1           | [nodemon] restarting due to changes...
my_container_1           | Thu, 24 May 2018 15:30:33 GMT nodemon bus.emit(exit) via SIGUSR2
my_container_1           | [nodemon] starting `node --inspect=0.0.0.0:7005 src/index.js`
my_container_1           | Thu, 24 May 2018 15:30:33 GMT nodemon bus emit: exit
my_container_1           | Thu, 24 May 2018 15:30:33 GMT nodemon spawning node --inspect=0.0.0.0:7005 src/index.js
my_container_1           | Thu, 24 May 2018 15:30:33 GMT nodemon bus new listener: exit (1)
my_container_1           | Thu, 24 May 2018 15:30:33 GMT nodemon start watch on: ./,../shared/
my_container_1           | Thu, 24 May 2018 15:30:33 GMT nodemon:watch early exit on watch, still watching (2)
my_container_1           | Debugger listening on port 7005.
my_container_1           | Warning: This is an experimental feature and could change at any time.
my_container_1           | To start debugging, open the following URL in Chrome:
my_container_1           |     chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2...

λ‹€μŒμ€ μ‹€νŒ¨ λ‘œκ·Έμž…λ‹ˆλ‹€.

my_container_1           | [nodemon] restarting due to changes...
my_container_1           | Thu, 24 May 2018 15:30:47 GMT nodemon bus emit: restart
my_container_1           | Thu, 24 May 2018 15:30:47 GMT nodemon bus.emit(exit) via SIGUSR2
my_container_1           | Thu, 24 May 2018 15:30:47 GMT nodemon bus emit: exit
my_container_1           | [nodemon] starting `node --inspect=0.0.0.0:7005 src/index.js`
my_container_1           | Thu, 24 May 2018 15:30:47 GMT nodemon spawning node --inspect=0.0.0.0:7005 src/index.js
my_container_1           | Thu, 24 May 2018 15:30:47 GMT nodemon bus new listener: exit (1)
my_container_1           | Thu, 24 May 2018 15:30:47 GMT nodemon start watch on: ./,../shared/
my_container_1           | Thu, 24 May 2018 15:30:47 GMT nodemon:watch early exit on watch, still watching (2)
my_container_1           | Unable to open devtools socket: address already in use
my_container_1           | [nodemon] app crashed - waiting for file changes before starting...

μΆ”κ°€λ‘œ 도움이 ν•„μš”ν•˜λ©΄ μ•Œλ €μ£Όμ„Έμš”.

포트λ₯Ό μ‚¬μš©ν•  수 μžˆμ„ λ•ŒκΉŒμ§€ μŠ€ν°μ„ λ‹€μ‹œ μ‹œλ„ν•˜λŠ” 것이 더 λ§Žμ€ μ‹œκ°„ λ™μ•ˆ 포트λ₯Ό μ‚¬μš©ν•˜λ„λ‘ ν•˜λŠ” 문제λ₯Ό 찾을 λ•ŒκΉŒμ§€ 쒋은 ν•΄κ²° 방법이 될 수 μžˆμŠ΅λ‹ˆλ‹€. 그런 λ‹€μŒ bus: exit κ°€ λ°©μΆœλ©λ‹ˆλ‹€.

이 λ¬Έμ œλŠ” 졜근 ν™œλ™μ΄ μ—†μ—ˆκΈ° λ•Œλ¬Έμ— 유휴 μƒνƒœλ‘œ μžλ™ ν‘œμ‹œλ˜μ—ˆμŠ΅λ‹ˆλ‹€. 더 이상 ν™œλ™μ΄ λ°œμƒν•˜μ§€ μ•ŠμœΌλ©΄ μžλ™μœΌλ‘œ λ‹«νž™λ‹ˆλ‹€. 이것이 잘λͺ»λ˜μ—ˆλ‹€κ³  μƒκ°ν•˜κ±°λ‚˜ λ¬Έμ œκ°€ μ—¬μ „νžˆ μ§€μ†λ˜λŠ” 경우 λŒ“κΈ€μ— λ‹΅μž₯을 μž…λ ₯ν•˜λ©΄ @remy κ°€ (μ‹œλ„!) 후속 쑰치λ₯Ό μ·¨ν•  κ²ƒμž…λ‹ˆλ‹€.
κΈ°μ—¬ν•΄μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€ <3

λ‚˜λŠ” λ˜ν•œ Docker μ»¨ν…Œμ΄λ„ˆ(Windows용 Docker) λ‚΄λΆ€μ—μ„œ 이것을 μ‹€ν–‰ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

μ•ˆλ…•ν•˜μ„Έμš” @remy , 저도 이 λ¬Έμ œμ™€ λ‹€λ₯Έ 문제λ₯Ό κ²ͺκ³  μžˆμŠ΅λ‹ˆλ‹€.

λ…Έλ“œ: 9.10.1
npm: 6.1.0
λ…Έλ“œλͺ¬: 1.17.5
운영 체제: μœˆλ„μš° 10
μ‹€ν–‰ν•œ λͺ…λ Ή: nodemon μ•±

λ‚΄ μ €μž₯μ†Œμ— λŒ€ν•œ λ§ν¬λŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€. https://github.com/AlexanderYW/uptime
이 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

λ™μΌν•œ λ¬Έμ œκ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.
# 1050μ—μ„œ λ‚˜λŠ” κ·Έ 의견 의 ν•΄κ²° 방법을 μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€.

nodemon --delay 80ms --exec 'fuser -k 56745/tcp; node --inspect=0.0.0.0:56745 ./app/http.js'

킬 포트 λ₯Ό 퓨저 둜 ꡐ체

이 문제λ₯Ό ν•΄κ²°λœ κ²ƒμœΌλ‘œ ν‘œμ‹œν•  수 μžˆμŠ΅λ‹ˆκΉŒ? λ°”λ‘œ κ·Έμͺ½μ—).

이것을 자주 λ¬»λŠ” μ§ˆλ¬Έμ— μΆ”κ°€ν•˜κ²Œ λ˜μ–΄ κΈ°μ©λ‹ˆλ‹€.

(FAQ에 좔가됨)

λ‹€μŒμ€ 이 문제λ₯Ό λ³΅μ œν•˜λŠ” λ¦¬ν¬μ§€ν† λ¦¬μž…λ‹ˆλ‹€. https://github.com/darkobits/nodemon-restart-issue.

Nodemon은 μƒˆ ν”„λ‘œμ„ΈμŠ€λ₯Ό μ‹œμž‘ν•˜κΈ° 전에 이전 ν”„λ‘œμ„ΈμŠ€κ°€ μ™„μ „νžˆ μ’…λ£Œλ˜κΈ°λ₯Ό κΈ°λ‹€λ¦¬λŠ” 것이 μ•„λ‹ˆλΌ Docker μ»¨ν…Œμ΄λ„ˆμ— μžˆμ„ λ•Œ _only_, 디버그 λͺ¨λ“œκ°€ ν™œμ„±ν™”λ  λ•Œ _only_ κΈ°λ‹€λ¦¬λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

λΆ„λͺ…νžˆ ν•˜κΈ° μœ„ν•΄: --inspect _does_ κ°€ 있으면 이전 ν”„λ‘œμ„ΈμŠ€μ—μ„œ μ—¬μ „νžˆ μ‚¬μš© 쀑인 λ™μΌν•œ ν¬νŠΈμ—μ„œ μ„œλ²„λ₯Ό μ—΄λ €κ³  ν•˜κΈ° λ•Œλ¬Έμ— μƒˆ ν”„λ‘œμ„ΈμŠ€κ°€ μ¦‰μ‹œ μΆ©λŒν•˜μ§€λ§Œ 이것은 단지 λ‹€μŒμ˜ λΆ€μž‘μš©μΌ λΏμž…λ‹ˆλ‹€. 이 문제. Docker μ»¨ν…Œμ΄λ„ˆμ—μ„œλ„ --inspect ν”Œλž˜κ·Έκ°€ 제거되면 Nodemon은 이전 ν”„λ‘œμ„ΈμŠ€κ°€ μ’…λ£Œλ  λ•ŒκΉŒμ§€ μ˜¬λ°”λ₯΄κ²Œ κΈ°λ‹€λ¦¬μ§€λ§Œ μ»¨ν…Œμ΄λ„ˆ λ‚΄λΆ€μ—μ„œ --inspect λ₯Ό μ‚¬μš©ν•  λ•Œ Nodemon은 기닀리지 _ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. ν”„λ‘œμ„ΈμŠ€λ₯Ό μ’…λ£Œν•©λ‹ˆλ‹€.

이게 도움이 되길 λ°”λž€λ‹€.


PS -- πŸ‘ Remy와 이 ν™˜μƒμ μΈ ν”„λ‘œμ νŠΈμ— κΈ°μ—¬ν•œ λ‹€λ₯Έ κ³΅ν—Œμž. 😸

@darkobits 보고 μžˆλŠ” λ‚΄μš©μ— λŒ€ν•΄ μƒˆλ‘œμš΄ 문제λ₯Ό μ‹œμž‘ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€(λ³΅μ œν•  μ €μž₯μ†Œκ°€ μžˆμœΌλ―€λ‘œ 특히 μœ μš©ν•¨). λ‚˜λŠ” μƒˆλ‘œμš΄ 문제λ₯Ό λ‹€λ£¨λŠ” 것을 μ„ ν˜Έν•©λ‹ˆλ‹€(특히 μƒˆλ‘œμš΄ λ°œκ²¬μ„ λ§ˆκ°ν•˜κ³  λ³΄κ³ ν•œ μ΄ν›„λ‘œ λ§Žμ€ μ‹œκ°„μ΄ ν˜λ €μ„ λ•Œ).

repo λ³΅μ œμ— λ‹€μ‹œ ν•œλ²ˆ κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€ πŸ‘

이것은 도컀 μ™ΈλΆ€μ—μ„œ λ‚˜μ—κ²Œ λ°œμƒν•©λ‹ˆλ‹€. https://github.com/nomcopter/nodemon-no-wait-repro

nodemon.json에 "signal": "SIGINT" λ₯Ό μΆ”κ°€ν•˜λ©΄ 이 λ¬Έμ œκ°€ ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

@Christilut μ‹ ν˜Έ SIGINTλ₯Ό nodemon.json에 μΆ”κ°€ν•˜λ©΄ 계속 λ‹€μ‹œ μ‹œμž‘λ˜μ§€λ§Œ 였λ₯˜λŠ” μ‚¬λΌμ§€μ§€λ§Œ 이것도 쒋은 해결책은 μ•„λ‹™λ‹ˆλ‹€. μ‹ ν˜Έ μ‹ ν˜Έκ°€ μ™œ 이것을 μΌμœΌν‚¬ 수 μžˆλŠ”μ§€ μ•Œκ³  μžˆμŠ΅λ‹ˆκΉŒ?

잘 λͺ¨λ₯΄κ² μ§€λ§Œ 이것은 λ‚΄κ°€ μ‚¬μš©ν•˜λŠ” 전체 κ΅¬μ„±μž…λ‹ˆλ‹€. μ•„λ§ˆλ„ 도움이 될 κ²ƒμž…λ‹ˆλ‹€.

nodemon.json

{
  "restartable": "rs",
  "ignore": [
    ".git",
    "node_modules/**/node_modules"
  ],
  "verbose": false,
  "execMap": {
    "ts": "node --require ts-node/register"
  },
  "watch": [
    "server/",
    "config/"
  ],
  "ext": "json,ts",
  "signal": "SIGINT"
}

(NPM 슀크립트둜) μ‹œμž‘: nodemon --inspect server/index.ts

κ·Έλž˜μ„œ 퓨저λ₯Ό μ‚¬μš©ν•œ 트릭이 μ €μ—κ²Œ νš¨κ³Όμ μ΄μ—ˆμŠ΅λ‹ˆλ‹€.
κ·ΈλŸ¬λ‚˜ λ•Œλ•Œλ‘œ μƒˆ ν”„λ‘œμ„ΈμŠ€λ₯Ό μ‹œμž‘ν•˜κΈ° 전에 ν”„λ‘œμ„ΈμŠ€λ₯Ό μ’…λ£Œν•˜μ§€ λͺ»ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€.
κ·Έλž˜μ„œ 이전 ν”„λ‘œμ„ΈμŠ€κ°€ ν™•μ‹€νžˆ μ’…λ£Œλ  λ•ŒκΉŒμ§€ 계속 μ§„ν–‰ν•˜μ§€ μ•Šλ„λ‘ while 루프λ₯Ό μ‚¬μš©ν•˜μ—¬ 문제λ₯Ό ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€.

λ‚΄ μ†”λ£¨μ…˜μ€ λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

nodemon --delay 100ms --exec 'while [ -n "$(fuser -k 9229/tcp)" ]; do sleep 0.1; done; node --inspect=0.0.0.0:9229 ./src/app.js'

이것이 λ―Έλž˜μ— λˆ„κ΅°κ°€λ₯Ό 돕기λ₯Ό λ°”λžλ‹ˆλ‹€.

μ‹ ν˜Έλ₯Ό κΈ°μ΄ν•˜κ²Œ SIGINT 둜 변경해도 λ¬Έμ œκ°€ ν•΄κ²°λ©λ‹ˆλ‹€. ν˜Όν•©μ— Dockerκ°€ μ—†μŠ΅λ‹ˆλ‹€.

SIGINTλ₯Ό μ‚¬μš©ν•œ ν›„ nodemon은 λ‹€μ‹œ μ‹œμž‘λ˜μ§€λ§Œ 디버거가 μ—°κ²°λ˜κ³  ν”„λ‘œμ„ΈμŠ€κ°€ μΌμ‹œ μ€‘μ§€λ˜λ©΄ ν”„λ‘œμ„ΈμŠ€λ₯Ό μ’…λ£Œν•  수 μ—†μŠ΅λ‹ˆλ‹€(즉, μ‚¬μš©μžκ°€ ν˜„μž¬ μ½”λ“œλ₯Ό 톡해 μŠ€ν…Œν•‘ 쀑).

image

λ‚΄ package.json ꡬ성:

    "start:dev": "nodemon --exec node --inspect=0.0.0.0:5860 ."
  },
  "nodemonConfig": {
    "ignore": [
      ".git",
      "cache/*",
      "logs/*"
    ],
    "env": {
      "NODE_ENV": "test"
    },
    "signal": "SIGINT",
    "verbose": true
  },
이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰