Practical Node.js: Building Real-World Scalable Web Apps 1st edition by Azat Mardan – Ebook PDF Instant Download/DeliveryISBN: 1484230398, 9781484230398
Full download Practical Node.js: Building Real-World Scalable Web Apps 1st edition after payment.
Product details:
ISBN-10 : 1484230398
ISBN-13 : 9781484230398
Author: Azat Mardan
Learn how to build a wide range of scalable real-world web applications using a professional development toolkit. If you already know the basics of Node.js, now is the time to discover how to bring it to production level by leveraging its vast ecosystem of packages.With this book, you’ll work with a varied collection of standards and frameworks and see how all those pieces fit together. Practical Node.js takes you from installing all the necessary modules to writing full-stack web applications. You’ll harness the power of the Express.js and Hapi frameworks, the MongoDB database with Mongoskin and Mongoose. You’ll also work with Pug and Handlebars template engines, Stylus and LESS CSS lanaguages, OAuth and Everyauth libraries, and the Socket.IO and Derby libraries, and everything in between. This exciting second edition is fully updated for ES6/ES2015 and also covers how to deploy to Heroku and AWS, daemonize apps, and write REST APIs. You’ll build full-stack real-world Node.js apps from scratch, and also discover how to write your own Node.js modules and publish them on NPM. Fully supported by a continuously updated source code repository on GitHub and with full-color code examples, learn what you can do with Node.js and how far you can take it! What You’ll Learn Manipulate data from the mongo console Use the Mongoskin and Mongoose MongoDB libraries Build REST API servers with Express and Hapi Deploy apps to Heroku and AWS Test services with Mocha, Expect and TravisCI Implement a third-party OAuth strategy with Everyauth Web developers who have some familiarity with the basics of Node.js and want to learn how to use it to build apps in a professional environment.
Practical Node.js: Building Real-World Scalable Web Apps 1st Table of contents:
Chapter 1: Setting up Node.js and Other Essentials
Installing Node.js and npm
One-Click Installers
Installing with HomeBrew or MacPorts
Installing from a Tar File
Installing Without sudo
Installing from Source Code
Multiversion Setup with NVM
Multiversion Setup with NVM for Windows
Alternative Multiversion Systems
Updating npm
Checking the Installation
Node.js Console (REPL)
Launching Node.js Scripts
Node.js Basics and Syntax
Loose Typing
Buffer—Node.js Super Data Type
Object Literal Notation
Functions
Define/Create a Function
Pass Functions as Parameters
Function Invocation vs. Expression
Arrays
Prototypal Nature
Conventions
Semicolons
camelCase
Naming
Commas
Indentation
Whitespace
Node.js Globals and Reserved Keywords
Node.js Process Information
Accessing Global Scope in Node.js
Exporting and Importing Modules
__dirname vs. process.cwd
Browser Application Programming Interface Helpers
Node.js Core Modules
http (http://nodejs.org/api/http.html)
util (http://nodejs.org/api/util.html)
querystring (http://nodejs.org/api/querystring.html)
url (http://nodejs.org/api/url.html)
fs (http://nodejs.org/api/fs.html)
Handy Node.js Utilities
Reading to and Writing from the File System in Node.js
Streaming Data in Node.js
Installing Node.js Modules with npm
Taming Callbacks in Node.js
Hello World Server with HTTP Node.js Module
Debugging Node.js Programs
Core Node.js Debugger
Debugging with Node Inspector
Node.js IDEs and Code Editors
Watching for File Changes
Summary
Chapter 2: Using Express.js to Create Node.js Web Apps
What Is Express.js?
How Express.js Works
Express.js Installation
Express.js Generator Version
Express.js Generator Installation
Local Express.js
Express.js Scaffolding
Express.js Command-Line Interface
Routes in Express.js
Middleware as the Backbone of Express.js
Configuring an Express.js App
Pug Is Haml for Express.js/Node.js
Final Thoughts Scaffolding
The Blog Project Overview
Submitting the Data
Express.js Hello World Example
Setting Up Folders
npm init and package.json
Dependency Declaration: npm install
The App.js File
Meet Pug: One Template to Rule Them All
Running the Hello World App
Summary
Chapter 3: TDD and BDD for Node.js with Mocha
Installing and Understanding Mocha
Understanding Mocha Hooks
TDD with the Assert
Chai Assert
BDD with Expect
Expect Syntax
Project: Writing the First BDD Test for Blog
Putting Configs into a Makefile
Summary
Chapter 4: Template Engines: Pug and Handlebars
Pug Syntax and Features
Tags
Variables/Locals
Attributes
Literals
Text
Script and Style Blocks
JavaScript Code
Comments
Conditions (if)
Iterations (each loops)
Filters
Interpolation
Case
Mixins
Include
Extend
Standalone Pug Usage
Handlebars Syntax
Variables
Iteration (each)
Unescaped Output
Conditions (if)
Unless
With
Comments
Custom Helpers
Includes (Partials)
Standalone Handlebars Usage
Pug and Handlebars Usage in Express.js
Pug and Express.js
Handlebars and Express.js
Project: Adding Pug Templates to Blog
layout.pug
index.pug
article.pug
login.pug
post.pug
admin.pug
Summary
Chapter 5: Persistence with MongoDB and Mongoskin
Easy and Proper Installation of MongoDB
How to Run the Mongo Server
Data Manipulation from the Mongo Console
MongoDB Console in Detail
Minimalistic Native MongoDB Driver for Node.js Example
Main Mongoskin Methods
Project: Storing Blog Data in MongoDB with Mongoskin
Project: Adding MongoDB Seed Data
Project: Writing Mocha Tests
Project: Adding Persistence
Running the App
Summary
Chapter 6: Security and Auth in Node.js
Authorization with Express.js Middleware
Token-Based Authentication
JSON Web Token (JWT) Authentication
Session-Based Authentication
Project: Adding E-mail and Password Login to Blog
Session Middleware
Authorization in Blog
Authentication in Blog
Running the App
The oauth Module
Twitter OAuth 2.0 Example with Node.js OAuth
Everyauth
Project: Adding Twitter OAuth 1.0 Sign-in to Blog with Everyauth
Adding a Sign-in with a Twitter Link
Configuring the Everyauth Twitter Strategy
Summary
Chapter 7: Boosting Node.js and MongoDB with Mongoose
Mongoose Installation
DB Connection in a Standalone Mongoose Script
Mongoose Schemas
Hooks for Keeping Code Organized
Custom Static and Instance Methods
Mongoose Models
Relationships and Joins with Population
Nested Documents
Virtual Fields
Schema Type Behavior Amendment
Express.js + Mongoose = True MVC
Summary
Chapter 8: Building Node.js REST API Servers with Express.js and Hapi
RESTful API Basics
Project Dependencies
Test Coverage with Mocha and Superagent
REST API Server Implementation with Express and Mongoskin
Refactoring: Hapi REST API Server
Summary
Chapter 9: Real-Time Apps with WebSocket, Socket.IO, and DerbyJS
What Is WebSocket?
Native WebSocket and Node.js with the ws Module Example
Browser WebSocket Implementation
Node.js Server with ws Module Implementation
Socket.IO and Express.js Example
Collaborative Online Code Editor Example with DerbyJS, Express.js, and MongoDB
Project Dependencies and package.json
Server-side Code
DerbyJS App
DerbyJS View
Editor Tryout
Summary
Chapter 10: Getting Node.js Apps Production Ready
Environment Variables
Express.js in Production
Error Handling
Multithreading with Cluster
Multithreading with pm2
Event Logging and Monitoring
Monitoring
REPL in Production
Winston
Papertrail App for Logging
Building Tasks with Grunt
A Brief on Webpack
Locking Dependencies
Git for Version Control and Deployments
Installing Git
Generating SSH Keys
Creating a Local Git Repository
Pushing the Local Repository to GitHub
Running Tests in Cloud with TravisCI
TravisCI Configuration
Summary
Chapter 11: Deploying Node.js Apps
Deploying to Heroku
Deploying to Amazon Web Services
Keeping Node.js Apps Alive with forever, Upstart, and init.d
forever
Upstart Scripts
init.d
Serving Static Resources Properly with Nginx
Caching with Varnish
Summary
Chapter 12: Modularizing Your Code and Publishing Node.js Modules to npm
Recommended Folder Structure
Modularizing Patterns
Composing package.json
Publishing to npm
Not-Locking Versions
Summary
Chapter 13: Node HTTP/2 Servers
Brief Overview of HTTP/2
SSL Key and Certificate
HTTP/2 Node Server
Node HTTP/2 Server Push
Summary
Chapter 14: Asynchronous Code in Node
async Module
Promises
Async Functions
Summary
Chapter 15: Node Microservices with Docker and AWS ECS
Installing Installations
Installing Docker Engine
Getting an AWS Account
Installing AWS CLI
Dockerizing Node Microservice
Creating/Copying the Node Project
Creating a Node.js Dockerfile
Use Docker Networks for Multi-container Setup
Creating a Docker Network
Launch App into a Network
Node Containers in AWS with EC2 ECS
Creating a Registry (ECR)
Create a New Task Definition
Defining the Main Task Settings for the Example
Defining the First Container: App
Defining the Second Container: Database
Creating Cluster
Creating the Cloud Container Service and Verifying it
Terminate Service and Cluster/Instances
Summary
Chapter 16: Serverless Node with AWS Lambda
Creating a DynamoDB Table
Creating an IAM Role to Access DynamoDB
Creating an AWS Lambda Resource
Creating an API Gateway Resource
Testing the RESTful API Microservice
Cleaning Up
Summary
Chapter 17: Conclusion
Author Contact
Further Learning
People also search for Practical Node.js: Building Real-World Scalable Web Apps 1st:
practical node js building real world scalable web apps
nodejs 8 the right way practical server-side javascript that scales
practical node.js building real-world scalable web apps
practical node.js building real-world scalable web apps pdf
building node.js
Tags: Practical Node, Building Real, World Scalable, Azat Mardan