expressfs

Allow your browser to call fs.

expressfs

expressfs adds fs routes to your express app like writeFile, readFile, et cetera.

Start the included app.js:

node app.js

Or you can extend your existing express app:

require('./expressfs.server.js')(app)

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="expressfs.browser.js"></script>

Call your methods:

expressfs.writeFile('helloWorld.txt', 'hello world', function () {
  expressfs.readFile('helloWorld.txt', function (data) {
    // Prints 'hello world'
    console.log(data)
  })
})
 
  • Get basics working
  • Add some tests
  • Refactor to use a more promisy feel

MIT

Breck Yunits