0

I just started playing with node debugger and noticed a node.js file which is invoked at the very beginning of node execution.

As the comment in the file says

This file is invoked by node::Load in src/node.cc, and responsible for bootstrapping the node.js core.

I'd like to change content of this file to something else (yes, I know there's no need to do that), is there a way to replace content of that file / specify path to new file without compiling node from source?

1 Answer 1

1

Short answer: Nope.

If I read the source correctly, the file node.js gets compiled into the resulting binary, as a string - the file itself does not exist anywhere on the filesystem so you cannot modify it and, for the same reason, you cannot tell Node to execute your own version of it.

Best look at the sources - mainly the LoadEnvironment method.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.