snode
The snode
command allows you to run an inspected instance of node.js. Running a script with snode
allows you to view all HTTP(S) requests made by a node.js process without making any code changes.
The command works much like the regular node
command in that you can pass in a script filename and optional arguments that will be available on process.argv
, or pass no arguments and get a REPL.
Note that at this time, snode
does not support any of the node command line options (although node-specific environment variables will work). As a workaround, you can use NODE_OPTIONS
to specify node options.
Options
Usage: snode [options] [script.js] [arguments] Options: --help Show help [boolean] --version Show version number [boolean] --sleuth-server URL of the inspection server [default: "ws://127.0.0.1:9000"] --sleuth-name Name of this process [default: "snode.<pid>"]
By default, the new process will show up in your target list identified by PID. Use --sleuth-name
to override.