Is there a way to execute some code (in a file or from a string, doesn't really matter) before dropping into interactive mode in node.js?
For example, if I create a script __preamble__.js
which contains:
console.log("preamble executed! poor guy!");
and a user types node __preamble__.js
they get this output:
preamble executed! poor guy!
> [interactive mode]