- Locate Command Prompt by entering cmd into the search bar. Click cmd in the search results to open the Command Prompt.
- Enter the following command, then press Enter to create a file named test-node.js containing a simple application that will print out the result 1 + 1.
echo console.log(1+1); >> test-node.js
nodefollowed by the name of the application, which is test-node.js in this case, and then press Enter.
The result of running the application will be printed out to the command prompt.
- Node.js and Node Package Manager (npm)
- How to Install Node.js on a Mac
- How to Run a Node.js Application on Windows (this article)
- How to Send and Receive JSON Data to and from the Server
- How to Run a Node.js Application on a Mac
- How to Install Node.js on Windows