Nodemon ayarlarını isterseniz bir config dosyasında tutabilirsiniz.
nodemon.json
{
"verbose": true,
"ignore": [
"e2e-tests/*",
"node_modules/*"
],
"watch": ["node/routes/*.js"],
"script": "node/bin/www"
}ya da package.json içinde scripts içinde özel bir anahtarda tutabilirsiniz:
package.json
{
"name": "angular-seed",
"private": true,
"version": "0.0.0",
"description": "A starter project for AngularJS",
"repository": "https://github.com/angular/angular-seed",
"license": "MIT",
"devDependencies": {
"bower": "^1.3.1",
"debug": "~2.0.0",
"http-server": "^0.6.1",
"karma": "~0.10",
"karma-junit-reporter": "^0.2.2",
"matchdep": "^0.3.0",
"mocha": "^2.2.4",
"protractor": "^1.1.1",
"shelljs": "^0.2.6"
},
"dependencies": {
"acl": "^0.4.7",
"activedirectory": "^0.6.3",
"body-parser": "~1.8.1",
"cheerio": "^0.19.0",
"compression": "1.1.1",
"connect-busboy": "0.0.2",
"connect-redis": "^2.2.0",
"consolidate": "^0.12.1",
"cookie-parser": "~1.3.3",
"ejs": "^2.3.1",
"emailjs": "^0.3.13",
"express": "~4.9.0",
"express-session": "1.8.2",
"iconv-lite": "0.4.6",
"jade": "~1.6.0",
"jquery": "^1.8.3",
"jsdom": "^4.1.0",
"moment": "2.8.3",
"morgan": "~1.3.0",
"node-xlsx": "^0.5.1",
"path": "0.4.9",
"q": "1.0.1",
"redis": "0.12.1",
"request": "2.44.0",
"serve-favicon": "~2.1.3",
"socket.io": "^1.3.4",
"underscore": "1.7.0",
"winston": "^0.9.0",
"winston-redis": "^0.3.0"
},
"scripts": {
"start": "node ./node/www",
"debug": "nodemon node/www -V -w './node/routes/**/*.js' -i './e2e-tests/*' -i './node_modules/*'",
"test": "./node_modules/.bin/mocha"
}
}Normalde test, start gibi tanımlarınızı
npm test, npm start ile çalıştırabilirken özel tanımladıklarınızı (burada debug oluyor) npm run debug ile çalıştırabilirsiniz.Konsolde eğer nodemon'u doğrudan çalıştırırsanız nodemon.json dosyasının içindekini okuyarak çalıştırmış olacağınızı hatırlatmaya gerek yok:
C:\_Projeler\AdminLTE\trunk>nodemon 24 Apr 15:32:03 - [nodemon] v1.3.6 24 Apr 15:32:03 - [nodemon] reading config C:\_Projeler\AdminLTE\trunk\nodemon.json 24 Apr 15:32:03 - [nodemon] to restart at any time, enter `rs` 24 Apr 15:32:03 - [nodemon] ignoring: e2e-tests/**/* node_modules/**/* 24 Apr 15:32:03 - [nodemon] watching: node/routes/*.js 24 Apr 15:32:03 - [nodemon] watching extensions: js 24 Apr 15:32:03 - [nodemon] starting `node index.js` 24 Apr 15:32:03 - [nodemon] child pid: 13100 24 Apr 15:32:03 - [nodemon] watching 0 files
