Skip to content

Instantly share code, notes, and snippets.

@lxe
Created May 21, 2013 20:16
Show Gist options
  • Save lxe/5622863 to your computer and use it in GitHub Desktop.
Save lxe/5622863 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var ws = fs.createWriteStream('file.out.json');
ws.on('open', function() {
ws.write(JSON.stringify({
foo : 'bar'
}));
ws.end();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment