Table of Contents for
Node.js 8 the Right Way
Close
Version ebook
/
Retour
Node.js 8 the Right Way
by Jim Wilson
Published by Pragmatic Bookshelf, 2018
Title Page
Node.js 8 the Right Way
Node.js 8 the Right Way
Node.js 8 the Right Way
Node.js 8 the Right Way
Acknowledgments
Preface
Why Node.js the Right Way?
What’s in This Book
What This Book Is Not
Code Examples and Conventions
Online Resources
Part I. Getting Up to Speed on Node.js 8
1. Getting Started
Thinking Beyond the web
Node.js’s Niche
How Node.js Applications Work
Aspects of Node.js Development
Installing Node.js
2. Wrangling the File System
Programming for the Node.js Event Loop
Spawning a Child Process
Capturing Data from an EventEmitter
Reading and Writing Files Asynchronously
The Two Phases of a Node.js Program
Wrapping Up
3. Networking with Sockets
Listening for Socket Connections
Implementing a Messaging Protocol
Creating Socket Client Connections
Testing Network Application Functionality
Extending Core Classes in Custom Modules
Developing Unit Tests with Mocha
Wrapping Up
4. Connecting Robust Microservices
Installing ØMQ
Publishing and Subscribing to Messages
Responding to Requests
Routing and Dealing Messages
Clustering Node.js Processes
Pushing and Pulling Messages
Wrapping Up
Node.js 8 the Right Way
Part II. Working with Data
5. Transforming Data and Testing Continuously
Procuring External Data
Behavior-Driven Development with Mocha and Chai
Extracting Data from XML with Cheerio
Processing Data Files Sequentially
Debugging Tests with Chrome DevTools
Wrapping Up
6. Commanding Databases
Introducing Elasticsearch
Creating a Command-Line Program in Node.js with Commander
Using request to Fetch JSON over HTTP
Shaping JSON with jq
Inserting Elasticsearch Documents in Bulk
Implementing an Elasticsearch Query Command
Wrapping Up
Node.js 8 the Right Way
Part III. Creating an Application from the Ground Up
7. Developing RESTful Web Services
Advantages of Express
Serving APIs with Express
Writing Modular Express Services
Keeping Services Running with nodemon
Adding Search APIs
Simplifying Code Flows with Promises
Manipulating Documents RESTfully
Emulating Synchronous Style with async and await
Providing an Async Handler Function to Express
Wrapping Up
8. Creating a Beautiful User Experience
Getting Started with webpack
Generating Your First webpack Bundle
Sprucing Up Your UI with Bootstrap
Bringing in Bootstrap JavaScript and jQuery
Transpiling with TypeScript
Templating HTML with Handlebars
Implementing hashChange Navigation
Listing Objects in a View
Saving Data with a Form
Wrapping Up
9. Fortifying Your Application
Setting Up the Initial Project
Managing User Sessions in Express
Adding Authentication UI Elements
Setting Up Passport
Authenticating with Facebook, Twitter, and Google
Composing an Express Router
Bringing in the Book Bundle UI
Serving in Production
Wrapping Up
Node.js 8 the Right Way
10. BONUS: Developing Flows with Node-RED
Setting Up Node-RED
Securing Node-RED
Developing a Node-RED Flow
Creating HTTP APIs with Node-RED
Handling Errors in Node-RED Flows
Wrapping Up
A1. Setting Up Angular
A2. Setting Up React
Node.js 8 the Right Way
Next
Next Chapter
Node.js 8 the Right Way
Next
Next Chapter
Node.js 8 the Right Way