You can easily forget to prefix a path with __dirname, so months ago (in
fact, years ago) I began implementing a solution to this issue because I
don't like to write the magic __dirname variable in front of all the paths.
This issue is related with the OS, not the programming language. There are
multiple solution like changing silently the cwd at runtime but this is not
the best way (as I was told). IMO the best way is to inform the user and
exit the process, so if the process doesn't exit then you can safely use
any path without __dirname.
Simply put this line in the top of your main file: require("rwd")
https://github.com/gagle/node-rwd
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
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].
For more options, visit https://groups.google.com/groups/opt_out.