Nodemon: --ํ•˜๋‚˜์˜ ํŒŒ์ผ ๋ณด๊ธฐ

์— ๋งŒ๋“  2014๋…„ 02์›” 20์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: remy/nodemon

์ฃผ์–ด์ง„ ๋””๋ ‰ํ† ๋ฆฌ์˜ ๋ชจ๋“  ํŒŒ์ผ๊ณผ ๋‹ค๋ฅธ ๋””๋ ‰ํ† ๋ฆฌ์˜ ๋‹จ์ผ ํŒŒ์ผ์„ ๋ณด๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค. ์ง€์›ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

C:\Stimulant\Source\ampm>nodemon --dump --watch . --watch ../ampm-test/WPF-test/
config.json server.js ../ampm-test/WPF-test/config.json
20 Feb 11:33:38 - [nodemon] v1.0.15
20 Feb 11:33:38 - [nodemon] to restart at any time, enter `rs`
20 Feb 11:33:38 - [nodemon] watching: *.* ../ampm-test/WPF-test/config.json
--------------
{ run: false,
  system:
   { cwd: 'C:\\Stimulant\\Source\\ampm',
     useFind: false,
     useWatch: true,
     useWatchFile: false },
  required: false,
  dirs: [ 'C:\\Stimulant\\Source\\ampm' ],
  timeout: 1000,
  options:
   { scriptPosition: 0,
     dump: true,
     watch:
      [ '.',
        '../ampm-test/WPF-test/config.json',
        re: /\.|\.\./ampm\-test/WPF\-test/config\.json/ ],
     script: 'server.js',
     args: [ '../ampm-test/WPF-test/config.json' ],
     restartable: 'rs',
     ignore:
      [ '.git',
        'node_modules/**/node_modules',
        'view',
        'samples',
        'logs',
        'app',
        'content',
        re: /\.git|node_modules/.*.*/node_modules|view|samples|logs|app|content/
 ],
     verbose: false,
     ext: 'js,json',
     execMap: { py: 'python', rb: 'ruby' },
     stdin: true,
     stdout: true,
     execOptions:
      { script: 'server.js',
        exec: 'node',
        nodeArgs: undefined,
        ext: 'js,json',
        env: {},
        execArgs: [] },
     monitor:
      [ '*.*',
        '../ampm-test/WPF-test/config.json',
        '!C:\\Stimulant\\Source\\ampm\\.git/**/*',
        '!node_modules/**/node_modules',
        '!C:\\Stimulant\\Source\\ampm\\view/**/*',
        '!C:\\Stimulant\\Source\\ampm\\samples/**/*',
        '!logs',
        '!app',
        '!content' ] },
  load: [Function],
  reset: [Function: reset],
  lastStarted: 0,
  loaded: [ 'C:\\Stimulant\\Source\\ampm\\nodemon.json' ],
  command:
   { raw:
      { executable: 'node',
        args: [ 'server.js', '../ampm-test/WPF-test/config.json' ] },
     string: 'node server.js ../ampm-test/WPF-test/config.json' } }
--------------
OS: win32 x64
node: v0.10.26
nodemon: v1.0.15
cwd: C:\Stimulant\Source\ampm
command: node C:\Users\josh.STIMULANT\AppData\Roaming\npm\node_modules\nodemon\b
in\nodemon.js --dump --watch . --watch ../ampm-test/WPF-test/config.json server.
js ../ampm-test/WPF-test/config.json
--------------

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋” ๊ฐ„๋‹จํ•œ ์žฌํ˜„ ...

C:\Stimulant\Source\ampm>nodemon server.js --watch ../ampm-test/WPF-test/config.json ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] v1.0.15
1 Mar 12:01:33 - [nodemon] to restart at any time, enter `rs`
1 Mar 12:01:33 - [nodemon] watching: ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] starting `node server.js ../ampm-test/WPF-test/config.json`

์ด์ œ ํ•˜๋‚˜์˜ ํŒŒ์ผ๋งŒ ๋ณด๋ผ๊ณ  ๋งํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ถœ๋ ฅ์€ ์˜ฌ๋ฐ”๋ฅธ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ด์ง€๋งŒ json ํŒŒ์ผ์ด ๋ณ€๊ฒฝ๋˜๋ฉด ์•„๋ฌด ์ผ๋„ ์ผ์–ด๋‚˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  4 ๋Œ“๊ธ€

ํ , monitor ์„ค์ •์˜ ์ถœ๋ ฅ์ด ์ œ๋Œ€๋กœ ๋ณด์ž…๋‹ˆ๋‹ค. ์ด ๋ ˆ์ด์•„์›ƒ์ด ์žˆ๋Š” ํ…Œ์ŠคํŠธ๋ฅผ ๋งŒ๋“ค์–ด ์ง์ ‘ ํ™•์ธํ•˜๊ณ  ๋””๋ฒ„๊ทธํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋” ๊ฐ„๋‹จํ•œ ์žฌํ˜„ ...

C:\Stimulant\Source\ampm>nodemon server.js --watch ../ampm-test/WPF-test/config.json ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] v1.0.15
1 Mar 12:01:33 - [nodemon] to restart at any time, enter `rs`
1 Mar 12:01:33 - [nodemon] watching: ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] starting `node server.js ../ampm-test/WPF-test/config.json`

์ด์ œ ํ•˜๋‚˜์˜ ํŒŒ์ผ๋งŒ ๋ณด๋ผ๊ณ  ๋งํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ถœ๋ ฅ์€ ์˜ฌ๋ฐ”๋ฅธ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ด์ง€๋งŒ json ํŒŒ์ผ์ด ๋ณ€๊ฒฝ๋˜๋ฉด ์•„๋ฌด ์ผ๋„ ์ผ์–ด๋‚˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์ ˆ๋Œ€ ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•˜๋”๋ผ๋„ ํŒŒ์ผ์ด ๋ณ€๊ฒฝ๋˜๋ฉด ์•„๋ฌด ์ผ๋„ ์ผ์–ด๋‚˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

C:\Stimulant\Source\ampm>nodemon server.js --watch C:\Stimulant\Source\ampm-test\WPF-test\config.json ../ampm-test/WPF-test/config.json
1 Mar 12:03:03 - [nodemon] v1.0.15
1 Mar 12:03:03 - [nodemon] to restart at any time, enter `rs`
1 Mar 12:03:03 - [nodemon] watching: C:\Stimulant\Source\ampm-test\WPF-test\config.json
1 Mar 12:03:03 - [nodemon] starting `node server.js ../ampm-test/WPF-test/config.json`

ํ™•์žฅ์ž๋ฅผ ์ง€์ •ํ•ด ๋ณด์…จ์Šต๋‹ˆ๊นŒ? #308 ์ฐธ์กฐ.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰