process.cwd();

On Saturday, May 26, 2012 at 9:13:10 PM UTC-4, Alan Hoffmeister wrote:
>
> Hello there!
>
> How can I get the main path of the app?
> Take a look at this example:
>
> 1) I have a module that return the app path, and I install it globally
>     npm install -g mymodule
>
> 2) Than I have my app.js installed on /home/myuser/app.js
>
>    mymodule = require('mymodule');
>    console.log(mymodule.path());
>
> 3) mymodule.path() needs to return the app path: /home/myuser
>
> How can I do this?
>
> --
> Att,
> Alan Hoffmeister
>

-- 
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/d7a3b9d1-251b-490c-a487-88e7f1c2ae57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to