what and the why of node.js. You'll see that even for a PHP or an ASP.NET developer, node.js will become an indispensable
- Why Node.js?
- Event-driven and non-blocking execution environment
- Understanding and using asynchronous control flows
Just as famous and useful as node is npm, the Node Package Manager. Npm manages your libraries and metadata of your application.
- Importing and exporting CommonJS Modules
- Installing external modules with the Node Package Manager
Creating a basic HTTP server
In this module you'll build your first HTTP server with node.js. You'll also learn why just having node is not enough.
- Hello World
- Understanding HTTP/1.1
There are a lot of little things that need to happen with every incoming request: check some cookie, do some logging, authenticate, set up a session, ...
With connect you can build a pipe of middleware components that each have their own responsibility without interfering with the rest of your code.
- The need for middleware
- Creating middleware components
- Connect’s middleware components
Creating web applications in node.js using Express
Express goes further than Connect, and next to providing middleware, it sets up an MVC-based mechanism. This includes routing and working with view engines.
In this module, you'll use Express primarily in a server-centric approach to create views.
- Setting up a project with Express
- Using a View Engine
Creating Services with Node.js
When adopting a more client-centric approach, Express also has us covered. You can use Express to set up a REST service that you can consume from your client.
- Rest services
- Building a Service with Express
Real-time communication with socket.io
REST is great for pull-scenarios, where your client knows when to fetch data. But what if your server wants to tell the client something?
Then we can use WebSockets. This module covers socket.io which is both a server and client-side API to do real-time communication.
- Web Sockets
- Socket.io Introduction
for scablable, IO-focused server tasks. This allows us to go beyond what's possible with classical thread-based IO we
and libraries are easy to re-use.