How to tell if node.js is installed or not


Question

I've done a bit of searching, to find the usual, not much, I can't find the "Node.js for dumbies" guide anywhere too.(teehee)

So anyways, down to business.

I've recently install node.js to start making some applications, first encountered problem: no idea how to run applications. All I did was install node.js but couldn't find further instructions. What does one really need to do? I wanted to see if it was actually working. So I executed a script called hello.js it went as such:

console.log('hello world');

Now where would this be logged to?

Edit

I'm running this .js through a .php script.

1
90
5/7/2012 1:27:50 AM

Open a terminal window. Type:

node -v

This will display your nodejs version.

Navigate to where you saved your script and input:

node script.js

This will run your script.

175
10/16/2018 12:02:22 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon