Sometimes when you're working on an app you need to be able to run arbitrary commands. You want to play with your app's modules without running a server. You just want to be able to execute arbitrary statements and immediately see the results. You want a REPL, or read-eval-print-loop that knows about your application.
You can achieve this with the basic node
command and a few require
statements, but why stop there when you can get crazy with it? That's exactly what we do in this episode.
From Episode 17 on, all the NodeSlash code will be in 1 repo with a different tag for each episode. To get the code for a particular episode, use the tags navigation above.