Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Azure DocumentDB

You're reading from   Learning Azure DocumentDB Create outstanding enterprise solutions around DocumentDB using the latest technologies and programming tools with Azure

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781783552467
Length 152 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Riccardo Becker Riccardo Becker
Author Profile Icon Riccardo Becker
Riccardo Becker
Arrow right icon
View More author details
Toc

Introducing Node.js


Node.js is gaining a lot of popularity during the last years and more and more developers embrace Node.js. But what is it and why should we use it?

What is Node.js?

Node.js is a runtime system for creating server applications. The core of Node.js is a bare, stripped server that accepts requests and can respond to them. All this occurs in a so called loop. There is no underlying web server like Internet Information Server or Apache needed to run Node.js. Every request to a Node.js application spins off a new thread on the server. This means that the main thread in Node.js never gets blocked and that potentially it can serve thousands and thousands of concurrent users. On http://nodejs.org, you can find lots of information and examples of Node.js.

The most basic example of a Node.js application is shown here:

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337,...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image