Guest User

Untitled

a guest
Sep 9th, 2015
80
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function readIndex(callback) {
  2. var path = "private/etc.json";
  3. var content;
  4. fs.readFile(path, function read(err, data) {
  5. if (err) {
  6. throw err;
  7. return 'undefined';
  8. }
  9. content = data;
  10. //either parse here or parse the callback
  11. callback(data);
  12.  
  13. });
  14. }
RAW Paste Data