| title | Run Node.js scripts from the command line |
|---|---|
| description | How to run any Node.js script from the CLI |
| authors | flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais |
| section | Getting Started |
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