Node.js – Find home directory in platform agnostic way
Process.platform returns “win32” for Windows. On Windows a user’s home directory might be C:\Users[USERNAME] or C:\Documents and Settings[USERNAME] depending on which version of Windows is being used. On Unix this isn’t an issue. 6 Answers 6