Verifying Node.js Executables

You should take a minute to verify that Node.js is installed and working before moving on. To do so, open a command prompt and execute the following command to bring up a Node.js VM:

node

Next, at the Node.js prompt, execute the following to write "Hello World" to the screen:

>console.log("Hello World");

After you see "Hello World" written to the console screen, exit the console by pressing Ctrl+C in Windows or Cmd+C on a Mac.

Next, verify that the npm command is working by executing the following command at the command prompt:

npm version

You should see output similar to the following:

{ http_parser: '1.0',
node: '0.10.21',
  v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.18',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1e',
npm: '1.3.11' }

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.239.226