Created
July 10, 2018 16:25
-
-
Save remy/eb87c8259c8b43d510f8be737f3c5d05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"script": "http.js", | |
"ext": "json", | |
"ignore": [".git", "node_modules/**/node_modules"], | |
"watch": "watchPath" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('http').createServer((req, res) => res.end('ok')).listen(8000); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nodemon = require('nodemon'); | |
const spawn = require('child_process').spawn; | |
nodemon({ | |
script: 'http.js', | |
ext: 'json', | |
ignore: ['.git', 'node_modules/**/node_modules'], | |
watch: ['./watch'], | |
}).on('restart', files => { | |
console.log(files.length, files); | |
/// process files | |
}); | |
setInterval(() => { | |
console.log('touching data file'); | |
spawn('touch', ['./watch/data.json']); | |
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "1383", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"dependencies": { | |
"nodemon": "*" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment