The while statement is an infinite loop because it doesn't have a break.
From top to bottom you have your fs object so that's good. Since your
setting up your objects maybe even put the path into it's own ;)
The readFile method is not being used correctly. The way a callback works
in Node.js is you pass an anonymous function as the callback. When reading
documentation for fs.readFile this is what we see.
fs.readFile('/etc/passwd', function (err, data) {
if (err) throw err;
console.log(data);
});
Hope this helps!
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/050be79e-d5f8-4f84-a3b8-d9886ac04a64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.