This patch adds a command line option (-r/--require) that allows one
to provide modules on the command line that will be 'required' during
node startup. This can be useful for debugging, tracing, memory leak
analysis etc. to be preloaded without explicit changes to the user
script. The option can be repeated to preload multiple modules.
PR-URL: https://github.com/iojs/io.js/pull/881
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
This reverts commit 7bde3f1a8f.
The added test (test/parallel/test-preload.js) fails on Windows.
PR-URL: https://github.com/iojs/io.js/pull/1150
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
-r/--require can be used to preload modules on node startup. The option
takes a single module name. The option can be repeated as necessary to
preload multiple modules.
This patch allows 'vendors' (such a cloud host) to inject functionality
that gets executed at application startup without requiring an explicit
require from the user's application. This can be useful to load vendor
specific application monitoring APIs transparently.
PR-URL: https://github.com/iojs/io.js/pull/881
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>