Skip to content

Instantly share code, notes, and snippets.

@nickpoorman
Created September 14, 2012 17:06
Show Gist options
  • Save nickpoorman/3723272 to your computer and use it in GitHub Desktop.
Save nickpoorman/3723272 to your computer and use it in GitHub Desktop.
Block Scoping
fs = require("fs");
try {
var config = JSON.parse(""+fs.readFileSync("config.json"));
} catch (ex) {
console.log('got an error: %s', ex);
process.exit(1);
}
console.log(config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment