node.jsnode-repl

Where is node repl default directory and how to change it?


I'm reloading my script a lot and would like to change the default directory where node repl is looking at so that I don't have to provide the whole path.

Is that possible?


Solution

  • The node.js REPL uses the current working directory (the directory in which you invoked the REPL) as a base when you use relative paths.