Advertisement
Guest User

Untitled

a guest
Sep 9th, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement