Node.js Web Development - Third Edition

Create real-time server-side applications with this practical, step-by-step guide

Node.js Web Development - Third Edition

This ebook is included in a Mapt subscription
David Herron

3 customer reviews
Create real-time server-side applications with this practical, step-by-step guide
$0.00
$18.00
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785881503
Paperback376 pages

Book Description

Node.js is a server-side JavaScript platform using an event driven, non-blocking I/O model allowing users to build fast and scalable data-intensive applications running in real time. Node.js Web Development shows JavaScript is not just for browser-side applications. It can be used for server-side web application development, real-time applications, microservices, and much more.

This book gives you an excellent starting point, bringing you straight to the heart of developing web applications with Node.js. You will progress from a rudimentary knowledge of JavaScript and server-side development to being able to create and maintain your own Node.js application. With this book you'll learn how to use the HTTP Server and Client objects, data storage with both SQL and MongoDB databases, real-time applications with Socket.IO, mobile-first theming with Bootstrap, microservice deployment with Docker, authenticating against third-party services using OAuth, and much more.

Table of Contents

Chapter 1: About Node.js
The capabilities of Node.js
Why should you use Node.js?
Summary
Chapter 2: Setting up Node.js
System requirements
Installing Node.js using package managers
Installing from source on POSIX-like systems
Installing developer tools on Mac OS X
Node.js versions policy and what to use
Running and testing commands
NPM – the Node.js package manager
Node.js and ECMAScript 6 (ES-2015, ES-2016, and so on)
Summary
Chapter 3: Node.js Modules
Defining a module
Node.js's algorithm for require (module)
npm – the Node.js package management system
A quick note about CommonJS
Summary
Chapter 4: HTTP Servers and Clients – A Web Application's First Steps
Sending and receiving events with EventEmitters
HTTP server applications
ES-2015 multiline and template strings
HTTP Sniffer – listening to the HTTP conversation
Web application frameworks
Getting started with Express
Calculating the Fibonacci sequence with an Express application
Making HTTP Client requests
Calling a REST backend service from an Express application
Summary
Chapter 5: Your First Express Application
ES-2015 Promises and Express router functions
Express and the MVC paradigm
Creating the Notes application
Theming your Express application
Scaling up – running multiple Notes instances
Summary
Chapter 6: Implementing the Mobile-First Paradigm
Problem – the Notes app isn't mobile friendly
Mobile-first paradigm
Using Twitter Bootstrap on the Notes application
Mobile-first design for the Notes application
Building a customized Bootstrap
Summary
Chapter 7: Data Storage and Retrieval
Data storage and asynchronous code
Logging
Storing notes in the filesystem
Summary
Chapter 8: Multiuser Authentication the Microservice Way
Creating a user information microservice
The Notes application stack
Summary
Chapter 9: Dynamic Interaction between Client and Server with Socket.IO
Introducing Socket.IO
Initializing Socket.IO with Express
Real time updates on the Notes home page
Inter-user chat and commenting for Notes
Summary
Chapter 10: Deploying Node.js Applications
Notes application architecture
Traditional Linux Node.js service deployment
Node.js microservice deployment with Docker
Summary
Chapter 11: Unit Testing
Testing asynchronous code
Assert – the simplest testing methodology
Testing a model
Using Docker to manage test database servers
Testing REST backend services
Frontend headless browser testing with CasperJS
Summary

What You Will Learn

  • Install and use Node.js for both development and deployment
  • Use the Express application framework
  • Configure Bootstrap for mobile-first theming
  • Use data storage engines such as MySQL, SQLITE3, and MongoDB
  • Understand user authentication methods, including OAuth, with third-party services
  • Deploy Node.js to live servers, including microservice development with Docker
  • Perform unit testing with Mocha
  • Perform functional testing of the web application with CasperJS

Authors

Table of Contents

Chapter 1: About Node.js
The capabilities of Node.js
Why should you use Node.js?
Summary
Chapter 2: Setting up Node.js
System requirements
Installing Node.js using package managers
Installing from source on POSIX-like systems
Installing developer tools on Mac OS X
Node.js versions policy and what to use
Running and testing commands
NPM – the Node.js package manager
Node.js and ECMAScript 6 (ES-2015, ES-2016, and so on)
Summary
Chapter 3: Node.js Modules
Defining a module
Node.js's algorithm for require (module)
npm – the Node.js package management system
A quick note about CommonJS
Summary
Chapter 4: HTTP Servers and Clients – A Web Application's First Steps
Sending and receiving events with EventEmitters
HTTP server applications
ES-2015 multiline and template strings
HTTP Sniffer – listening to the HTTP conversation
Web application frameworks
Getting started with Express
Calculating the Fibonacci sequence with an Express application
Making HTTP Client requests
Calling a REST backend service from an Express application
Summary
Chapter 5: Your First Express Application
ES-2015 Promises and Express router functions
Express and the MVC paradigm
Creating the Notes application
Theming your Express application
Scaling up – running multiple Notes instances
Summary
Chapter 6: Implementing the Mobile-First Paradigm
Problem – the Notes app isn't mobile friendly
Mobile-first paradigm
Using Twitter Bootstrap on the Notes application
Mobile-first design for the Notes application
Building a customized Bootstrap
Summary
Chapter 7: Data Storage and Retrieval
Data storage and asynchronous code
Logging
Storing notes in the filesystem
Summary
Chapter 8: Multiuser Authentication the Microservice Way
Creating a user information microservice
The Notes application stack
Summary
Chapter 9: Dynamic Interaction between Client and Server with Socket.IO
Introducing Socket.IO
Initializing Socket.IO with Express
Real time updates on the Notes home page
Inter-user chat and commenting for Notes
Summary
Chapter 10: Deploying Node.js Applications
Notes application architecture
Traditional Linux Node.js service deployment
Node.js microservice deployment with Docker
Summary
Chapter 11: Unit Testing
Testing asynchronous code
Assert – the simplest testing methodology
Testing a model
Using Docker to manage test database servers
Testing REST backend services
Frontend headless browser testing with CasperJS
Summary

Book Details

ISBN 139781785881503
Paperback376 pages
Read More
From 3 reviews

Read More Reviews