Chapter 1. A Very Brief Introduction to Node.js
Node.js is many things, but mostly it’s a way of running JavaScript outside the web browser. This book will cover why that’s important and the benefits that Node.js provides. This introduction attempts to sum up that explanation in a few paragraphs, rather than a few hundred pages.
Many people use the JavaScript programming language extensively for programming the interfaces of websites. Node.js allows this popular programming language to be applied in many more contexts, in particular on web servers. There are several notable features about Node.js that make it worthy of interest.
Node is a wrapper around the high-performance
V8 JavaScript runtime from the Google Chrome browser. Node
tunes V8 to work better in contexts other than the browser, mostly by
providing additional APIs that are optimized for specific use cases. For
example, in a server context, manipulation of binary data is often
necessary. This is poorly supported by the JavaScript language and, as a
result, V8. Node’s Buffer class
provides easy manipulation of binary data. Thus, Node doesn’t
just provide direct access to the V8 JavaScript runtime. It also makes
JavaScript more useful for the contexts in which people use Node.
V8 itself uses some of the newest techniques in compiler technology. This often allows code written in a high-level language such as JavaScript to perform similarly to code written in a lower-level language, such as C, with a fraction of the development ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access