Search code examples
node.jsnodemon

What is the option '-r' in nodemon?


Nodemon options docs don't mention anything with this. Nowhere I can find anything about the option -r.

To give you some context, here is where it is being used.

Update

After answered this question, subsequently, another question popped up: Why use this? There is already an unanswered SO question here


Solution

  • -r is not a nodemon but a node option.

    node --help says:

    -r, --require=... module to preload (option can be repeated)
    

    In your example, it was "preloading" dotenv-safe/config