2

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

carkod
  • 1,844
  • 19
  • 32

2 Answers2

5

-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

paulsm4
  • 114,292
  • 17
  • 138
  • 190
LongHike
  • 4,016
  • 4
  • 37
  • 76
  • Sorry about that - we answered at the same time. To add insult to injury, I accidentally clicked the wrong ":edit" button, and added an additional note to your post, instead of mine. Apologies! My bad :( – paulsm4 Dec 21 '18 at 07:00
  • No problem, your answer is more concise anyway. – LongHike Dec 21 '18 at 07:02
2

You can find the nodemon CLI options using --help, or listed here:

https://github.com/remy/nodemon/blob/master/doc/cli/options.txt

As it happens, the -r you cited is actually a nodeJS argument, not nodemon.

Per node --help:

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

paulsm4
  • 114,292
  • 17
  • 138
  • 190