What Is Node?

Node (also called Node.js in contexts where the term “Node” might be ambiguous) is a JavaScript runtime environment powered by V8, the engine used by Google’s Chrome browser. While browsers provide a JavaScript environment with an API that allows code to interact with a web page, the Node API gives JavaScript access to the underlying operating system. That means that scripts running in Node can read and write files, spawn processes, and bind to TCP ports. In fact, any functionality that can be accessed by a C program can be added to Node via addons.[41]

But the most exciting thing about Node isn’t the technology, it’s the community. Node developers have accomplished amazing feats since Node’s debut in early 2009, building a rich ecosystem of open-source packages and using Node in production at high-profile companies such as PayPal, LinkedIn, and Uber. To see some of the cool mini-projects the community has built, look no further than the Node Knockout, an annual competition to develop the best Node app in forty-eight hours.[42]

Node also has the best package manager on the planet, npm.[43] Although originally started independently, npm was quickly embraced as an official accompaniment to Node, and the two projects are now developed in tandem to complement each other. I like npm so much that I wrote a (short) book about it: The npm Book.[44] You’ll get a taste of npm as we build this chapter’s project.

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

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