Skip to content

Instantly share code, notes, and snippets.

@brettcave
Created November 27, 2013 08:56
Show Gist options
  • Save brettcave/7672685 to your computer and use it in GitHub Desktop.
Save brettcave/7672685 to your computer and use it in GitHub Desktop.
node.js sample
var fs = require('fs')
fs.exists("/path/to/some/file", function(exists) {
var foo = "bar"
if (exists)
foo = "foobar";
module.exports = foo;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment