Run Node.js scripts from the command line

Run Node.js scripts from the command line

The usual way to run a Node.js program is to call the node globally available command (once you install Node.js) and pass the name of the file you want to execute.

If your main Node.js application file is in app.js, you can call it by typing

node app.js
Edit this page on GitHub