售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Title Page
Third Edition
Copyright
Node Cookbook
Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Why subscribe?
Customer Feedback
About nearForm
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
Debugging Processes
Introduction
Debugging Node with Chrome Devtools
Getting ready
How to do it...
How it works...
There's more...
Using node-inspector with older node versions
Immediately pausing a process on start
node debug
See also
Enhancing stack trace output
Getting ready
How to do it...
How it works...
There's more...
Infinite stack trace limit in development
Stack trace layout
Asynchronous stack traces
See also
Enabling debug logs
Getting ready
How to do it...
How it works...
There's more...
Instrumenting code with debug
Using debug in production
JSON logging with pino-debug
See also
Enabling core debug logs
Getting ready
How to do it...
How it works...
There's more...
Creating our own NODE_DEBUG flags
Debugging Node core libraries
See also
Writing Modules
Introduction
Scaffolding a module
Getting ready
How to do it...
How it works...
There's more...
Reinitializing
Versioning
See also
Installing dependencies
Getting ready
How to do it...
How it works...
There's more...
Installing development dependencies
Using npm run scripts
Eliminating the need for sudo
See also
Writing module code
Getting ready
How to do it...
How it works...
There's more...
Adding tests
Modernizing syntax
See also
Publishing a module
Getting ready
How to do it...
How it works...
There's more...
Detecting Vulnerabilities
Extraneous dependencies
Prepublish
Decentralized publishing
See also
Using a private repository
Getting ready
How to do it...
How it works...
There's more…
Module caching
Scope registries
See also
Coordinating I/O
Introduction
Interfacing with standard I/O
Getting ready
How to do it...
How it works...
There's more...
Piping
TTY Detection
See also
Working with files
Getting ready
How to do it...
How it works...
There's more...
Asynchronous file operations
Incremental Processing
See also
Fetching metadata
Getting ready
How to do it...
How it works...
There's more...
Getting symlink information
Checking file existence
Manipulating metadata
See also
Watching files and directories
Getting ready
How to do it...
How it works...
There's more...
Watching directories with chokidar
See also
Communicating over sockets
Getting ready
How to do it...
How it works...
There's more...
net sockets are streams
Unix sockets
UDP sockets
See also
Using Streams
Introduction
Processing Big Data
Getting ready
How to do it...
How it works...
There's more...
Types of stream
Processing infinite amounts of data
Flow mode versus pull-based streaming
Understanding stream events
See also
Using the pipe method
Getting ready
How to do it...
How it works...
There's more...
Keeping piped streams alive
See also
Piping streams in production
Getting ready
How to do it...
How it works...
There's more...
Use pumpify to expose pipelines
See also
Creating transform streams
Getting ready
How to do it...
How it works...
There's more...
Transform streams with Node's core stream module
Creating object mode transform streams
See also
Creating readable and writable streams
Getting ready
How to do it...
How it works...
There's more...
Readable and writable streams with Node's core stream module
Core readable streams flow control issue
Composing duplex streams
See also
Decoupling I/O
Getting ready
How to do it...
How it works...
There's more...
Stream destruction
Handling backpressure
See also
Wielding Web Protocols
Introduction
Creating an HTTP server
Getting ready
How to do it...
How it works...
There's more...
Binding to a random free port
Dynamic content
See also
Receiving POST data
Getting ready
How to do it...
How it works...
There's more...
Accepting JSON
See also
Handling file uploads
Getting ready
How to do it...
How it works...
There's more...
Processing all field types in multipart data
Uploading files via PUT
See also
Making an HTTP POST request
Getting ready
How to do it...
How it works...
HTTPS requests
There's more...
Buffering a GET request
Streaming payloads
Multipart POST uploads
See also
Communicating with WebSockets
Getting ready
How to do it...
How it works...
There's more...
Creating a Node.js WebSocket client
See also
Creating an SMTP server
Getting ready
How to do it...
How it works...
There's more...
Making an SMTP client
See also
Persisting to Databases
Introduction
Connecting and sending SQL to a MySQL server
Getting ready
How to do it...
How it works...
There's more...
Avoiding SQL injection
Querying a MySQL database
Connecting and sending SQL to a Postgres server
Getting ready
How to do it...
How it works...
There's more...
Using native bindings
Storing object-modelled data
Storing and retrieving data with MongoDB
Getting ready
How to do it...
How it works...
There's more...
Indexing and aggregation
Updating modifiers, sort, and limit
Storing and retrieving data with Redis
Getting ready
How to do it...
How it works...
There's more...
Command batching
Using Redis
Authenticating
Embedded persistence with LevelDB
Getting ready
How to do it...
How it works...
There's more...
Alternative storage adapters
Working with Web Frameworks
Introduction
Creating an express web app
Getting ready
How to do it...
How it works...
There's more...
Production
Route parameters and POST requests
Creating middleware
See also
Creating a Hapi web app
Getting ready
How to do it...
How it works...
There's more...
Creating a plugin
Label selecting
See also
Creating a Koa web app
Getting ready
How to do it...
How it works...
There's more...
Creating middleware
Performing asynchronous lookups
See also
Adding a view layer
Getting ready
How to do it...
How it works...
There's more...
Adding a view layer to Koa
Adding a view layer to Hapi
ES2015 template strings as views
See also
Adding logging
Getting ready
How to do it...
How it works...
There's more...
Pino transports and prettifying
Logging with Morgan
Logging with Winston
Adding logging to Koa
Adding logging to Hapi
Capturing debug logs with with Pino
See also
Implementing authentication
Getting ready
How to do it...
How it works...
There's more...
Session authentication in Hapi
Session authentication in Koa
See also
Dealing with Security
Introduction
Detecting dependency vulnerabilities
Getting ready
How to do it...
How it works...
There's more...
Module vetting
Restricting core module usage
See also
Hardening headers in web frameworks
Getting ready
How to do it...
How it works...
There's more...
Avoiding fingerprinting
Hardening a core HTTP server
Hardening Koa
Hardening Hapi
See also
Anticipating malicious input
Getting ready
How to do it...
How it works...
There's more...
Buffer safety
Dealing with JSON pollution
See also
Guarding against cross site scripting (XSS)
Getting ready
How to do it...
How it works...
There's more...
Preventing protocol-handler-based XSS
Parameter validation
Escaping in JavaScript contexts
See also
Preventing cross site request forgery
Getting ready
How to do it...
How it works...
There's more...
Securing older browsers
See also
Optimizing Performance
Introduction
Benchmarking HTTP
Getting ready
How to do it...
How it works...
There's more...
Profiling for production
Measuring POST performance
See also
Finding bottlenecks with flamegraphs
Getting ready
How to do it...
How it works...
There's more...
Finding a solution
How 0x works
CPU profiling with Chrome Devtools
See also
Optimizing a synchronous function call
Getting ready
How to do it...
How it works...
There's more...
Function inlining
Checking the optimization status
Tracing optimization and deoptimization events
See also
Optimizing asynchronous callbacks
Getting ready
How to do it...
How it works...
There's more...
A database solution
A caching solution
See also
Profiling memory
Getting ready
How to do it...
How it works...
There's more...
Visualizing memory usage in the Terminal
See also
Building Microservice Systems
Introduction
Creating a simple RESTful microservice
Getting ready
How to do it...
How it works...
There's more...
Using the core HTTP module
Testing microservices with a browser
See also
Consuming a service
Getting ready
How to do it...
How it works...
There's more...
Integration testing
See also
Setting up a development environment
Getting ready
How to do it...
How it works...
There's more...
A minimal alternative to fuge
Debug command
Shell pass through
Apply command
See also
Standardizing service boilerplate
Getting ready
How to do it...
How it works...
There's more...
Unit testing
Pattern routing
See also
Using containerized infrastructure
Getting ready
How to do it...
How it works...
There's more...
Running containers in the background
See also
Service discovery with DNS
Getting ready
How to do it...
How it works...
There's more...
Alternative service discovery mechanisms
Viewing the environment and DNS Zone
See also
Adding a Queue Based Service
Getting ready
How to do it...
How it works...
Single responsibility
Loose coupling
Vertical separation
Stateless
A note on security
There's more...
Entering a containers shell environment
Saving container state
Cleaning up containers
See also
Deploying Node.js
Introduction
Building a container for a Node.js process
Getting ready
How to do it...
How it works...
There's more...
Viewing the layers in a Docker image
Adding a new layer
Docker alternatives & container standards
See also
Running a Docker registry
Getting ready
How to do it...
Linux troubleshooting
How it works...
There's more...
Tagging
See also
Storing images on DockerHub
Getting ready
How to do it...
How it works...
There's more...
Using a specific version tag
See also
Deploying a container to Kubernetes
Getting ready
How to do it...
How it works...
There's more...
Using the minikube dashboard
Pushing microservice updates into Kubernetes
See also
Creating a deployment pipeline
Getting ready
How to do it...
How it works...
There's more...
Debugging the build
Automating the build trigger
See also
Deploying a full system
Getting ready
How to do it...
How it works...
There's more...
Running a report
See also
Deploying to the cloud
Getting ready
How to do it...
How it works...
There's more...
Running the dashboard
Inspecting the kops State Store
See also
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜