Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start up script for node.js repl

Tags:

People also ask

How do I start REPL in node JS?

Starting the REPL is simple - just run node on the command line without a filename. It then drops you into a simple prompt ('>') where you can type any JavaScript command you wish. As in most shells, you can press the up and down arrow keys to scroll through your command history and modify previous commands.

What command can you use to start REPL?

Getting Started with REPL: To start working with REPL environment of NODE; open up the terminal (in case of UNIX/LINUX) or the Command prompt (in case of Windows) and write node and press 'enter' to start the REPL. The REPL has started and is demarcated by the '>' symbol.


Is there a way configure node.js's repl? I want to require jquery and underscore automatically whenever the repl starts. Is there a file (noderc?) that node.js loads when it starts the repl?

The equivalent in Python is to edit ~/.ipython/ipy_user_conf.py with:

import_mod('sys os datetime re itertools functools')