Created
December 21, 2013 22:51
-
-
Save vojtajina/8076226 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var chokidar = require('chokidar'); | |
var watcher = new chokidar.FSWatcher({ | |
usePolling: false, | |
useFsEvents: true, | |
// changing to false makes it work | |
ignoreInitial: true, | |
}); | |
watcher.add('/Users/vojta/Code/karma/test/e2e/basic'); | |
watcher.on('change', function() { | |
console.log('change', arguments) | |
}); | |
// start socket.io server | |
var io = require('socket.io'); | |
var http = require('http'); | |
var server = http.createServer(function() {}); | |
io.listen(server); | |
server.listen(8080, function() { | |
// commenting this out will make it work too | |
http.get('http://localhost:8080/socket.io/socket.io.js'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment