Friday, 26 May 2017

How to access module when running node --require

The node command line accepts a "--require" (or -r) option which preloads modules. Is there a way to access that in an eval script? I'm trying to do something like this:

node --require mymodule -e 'mymodule.test()'



via Ted Elliott

No comments:

Post a Comment