|
node를 실행
vscode에 launch.json
|
{ // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요. // 기존 특성에 대한 설명을 보려면 가리킵니다. // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요. "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:3000", "webRoot": "${workspaceFolder}/src" } ] } |
터널링 구축
|
ssh -N -L 9221:localhost:9229 [remoteIP] |
node를 inspection 모드로 변경 & 웹 서버 실행
|
node --inspect & yarn start |
vscode에 launch.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
{ // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요. // 기존 특성에 대한 설명을 보려면 가리킵니다. // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요. "version": "0.2.0", "configurations": [ { "address": "localhost", "localRoot": "${workspaceFolder}", "name": "Attach to Remote", "port": 9229, "remoteRoot": "...", "request": "attach", "skipFiles": [ "<node_internals>/**" ], "type": "pwa-node" } ] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
upstream myserver { # 기본 round robin server localhost:3000; server localhost:3001; } server { listen 8080; listen [::]:8080; # server_name xxx.anyons.net; root /nodejsPath; location / { allow 192.168.1.0/24; deny all; # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. # try_files $uri $uri/ =404; try_files $uri @myserver; } location @myserver { proxy_redirect off; proxy_http_version 1.1; proxy_pass http://myserver; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header X-NginX-Proxy true; # proxy_redirect http://myserver http://$server_name; } } |
현재 node.js 버전 확인
캐시 삭제
|
$ sudo npm cache clean -f |
n 모듈 설치
n 모듈을 사용하여 nodejs 설치
새로운 node.js 버전 확인
|
$ sudo npm cache clean -f |
|
|