This is a great idea for a wiki page, yes. On Thu, Mar 15, 2012 at 12:44, Ted Young <[email protected]> wrote: > paths - how necessary is it to use the path module? For example, is it > necessary to use in require() statements? fs statements?
Use path.resolve() to resolve paths and make relative paths absolute. Do not use path.join() for this. It is not nearly as smart about Windows paths. > system resources - when accessing system resources, best practices? For > example, in python if you want to access /dev/null you can say os.devnull, > but there currently is no node equivalent. I'm not sure what the best answer for /dev/null on windows is. Igor? Bert? > npm global installs - for node-based system services, often you will want to > have conf files, etc, and will want to have a default set of locations to > look for them if the user does not specify a conf file in the invocation. > Also, different systems may prefer different config file formats (ini, > etc). What are good default directories to look in, and formats to > support? When installed with the standard node msi installer, npm global installs work on Windows by writing to the %AppData%\npm\ directory, and %AppData%\npm is added to the %Path% so that globally installed executables are accessible. A cross-platform pwnam utility would be great, but we don't have one at the moment. Here's how npm figures out appropriate home and tmp directories: https://github.com/isaacs/npm/blob/master/lib/utils/config-defs.js#L65-74 -- 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
