I was writing things in a file and then executing them with
node file.js when I decided it was time to work inside the Node repl.
For this the question became how do you load your file and have access to the functions and variables.
$ node > .load file.js . . ... messages . >
Nicely, after editing the file you can reload it by executing the same again.