O'Reilly logo

Learning Underscore.js by Alex Pop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Underscore on the server with Node.js

In Chapter 1, Getting Started with Underscore.js, we briefly introduced Node.js together with instructions on how to install and use its package manager npm. By using Node.js from the operating system command line, we can execute JavaScript server-side code: JavaScript runs inside the Node.js process with full access to operating system resources.

Executing JavaScript with Node.js

At this point, Node.js and npm are available in the command line, and if we execute the command node, you should see a prompt > appearing in the console waiting for further input. We have launched Node.js as an interactive shell, which is similar to the browser JavaScript console mode, and we can now execute any JavaScript code ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required