socketfs

Allows your browser to watch a file.

socketfs

socketfs adds watch and unwatch methods so you can watch files from your browser.

Start the included app.js:

node app.js

Or you can extend your existing express app:

require('./socketfs.server.js')(app, httpServer)

Include requirements:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="space.js"></script>
<script type="text/javascript" src="socket-io.js"></script>
<script type="text/javascript" src="socketfs.browser.js"></script>

Call your methods:

socketfs.connect()
socketfs.watch('test/hello.txt', function () {
  $('pre').append('test/hello.txt changed\n')
})

MIT

Breck Yunits