Chapter 1. Instant Node.js Starter

Welcome to Instant Node.js Starter. This book has been especially created to provide you with all the information that you need to get up to speed with Node.js, a platform for building fast and scalable network applications. You will learn the basics of nodes, get started with building your first Node.js HTTP server, and learn about the five main building blocks of Node.js: modules, callback functions, the event emitter, streams, and NPM.

This book contains the following sections:

So what is Node.js? helps you find out what Node.js actually is, what you can do with it, and why it’s so great.

Installation teaches you how to download and install Node.js with the minimum fuss and then set it up so that you can use it as soon as possible.

Quick start will show you how to start building an HTTP server using Node.js.

Top 5 features you need to know about will teach you how to perform five tasks involving the most important features of Node.js. By the end of this section, you will understand and be able to create modules, install third-party modules via NPM, and use the three main patterns of Node.js: callback functions, event emitters, and streams.

People and places you should get to know provides you with many useful links to the project page and forums as well as a number of helpful articles, tutorials, blogs, and the Twitter feeds of Node.js super-contributors. This is vital, because every open source project is centered around a community.

So, what is Node.js?

Node.js is an open source platform that allows you to build fast and scalable network applications using JavaScript. Node.js is built on top of V8, a modern JavaScript virtual machine that powers Google's Chrome web browser.

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js can handle multiple concurrent network connections with little overhead, making it ideal for data-intensive, real-time applications.

With Node.js, you can build many kinds of networked applications. For instance, you can use it to build a web application service, an HTTP proxy, a DNS server, an SMTP server, an IRC server, and basically any kind of process that is network intensive.

You program Node.js using JavaScript, which is the language that powers the Web. JavaScript is a powerful language that, when mastered, makes writing networked, event-driven applications fun and easy.

Node.js recognizes streams that are resistant to precarious network conditions and misbehaving clients. For instance, mobile clients are notoriously famous for having large latency network connections, which can put a big burden on servers by keeping around lots of connections and outstanding requests. By using streaming to handle data, you can use Node.js to control incoming and outgoing streams and enable your service to survive.

Also, Node.js makes it easy for you to use third-party open source modules. By using Node Package Manager (NPM), you can easily install, manage, and use any of the several modules contained in a big and growing repository. NPM also allows you to manage the modules your application depends on in an isolated way, allowing different applications installed in the same machine to depend on different versions of the same module without originating a conflict, for instance. Given the way it's designed, NPM even allows different versions of the same module to coexist in the same application.

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

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