Reputation:
Just getting started with node.js. I've a Windows PC. I went to nodejs.org and downloaded the nodejs.msi for Windows then, I saw a folder in programfilesx86.
How do i write and compile my helloworld program?
I guess, I have to use the command prompt. I even created a file hello.js but i don't know where it goes or how to execute it.
Any inputs on this will be appreciated.
Upvotes: 3
Views: 3689
Reputation: 63912
Alternative is to use IDE like Enide Studio http://sf.net/p/nodeclipse/
Instead of typing in command prompt, just right-click any .js file and select Run As -> Node application, see output in console View. All in one windows, no need switch between. Integrated debugger and JSHint.
Upvotes: 0
Reputation:
After restarting my system,this worked bcoz it is windows.In windows,you've to restart after installing any thing.
Upvotes: 2
Reputation: 63653
Go to the command prompt (> Run > cmd), which is the Windows terminal.
There type node -v to see if Node is responding ok (it should display the version installed).
After that navigate to the folder containing your 'hello world' example.
For ex if you hello.js is in C:\ then:
cd C:
node hello.js
That should work.
Upvotes: 6