万本电子书0元读

万本电子书0元读

顶部广告

Deploying Node.js电子书

售       价:¥

13人正在读 | 0人评论 9.8

作       者:Sandro Pasquali

出  版  社:Packt Publishing

出版时间:2015-07-23

字       数:243.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
If you are an intermediate or advanced developer deploying your Node.js applications, then this book is for you. If you have already built a Node application or module and want to take your knowledge to the next level, this book will help you find your way.
目录展开

Deploying Node.js

Table of Contents

Deploying Node.js

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

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

1. Appreciating Node

Understanding Node's unique design

Concurrency

Parallelism and threads

Concurrency and processes

Events

The event loop

The implications of Node's design on system architects

Building large systems out of small systems

Streams

Using full-stack JavaScript to maximum effect

Hot code

Browserify

Summary

2. Installing and Virtualizing Node Servers

Getting a basic Node server up and running

Hello world

Making HTTP requests

Proxying and tunneling

HTTPS, TLS (SSL), and securing your server

Creating a self-signed certificate for development

Installing a real SSL certificate

Installing applications on Heroku

Add-ons

Git

Managing configuration variables

Managing your deployment

Installing applications on OpenShift

Installing a Node application and MongoDB

Deploying your app

Using Docker to create lightweight virtual containers

First, some Unix

Getting started with Docker

Creating a Dockerfile

Building and running a Docker image

Summary

3. Scaling Node

Scaling vertically across multiple cores

spawn(command, [arguments], [options])

fork(modulePath, [arguments], [options])

exec(command, [options], callback)

execFile

Communicating with your child process

child.connected

child.stdin

child.stdout

child.stderr

child.pid

child.kill([signal])

child.disconnect()

child.send(message, [sendHandle])

The cluster module

cluster.isMaster

cluster.isWorker

cluster.worker

cluster.workers

cluster.setupMaster([settings])

cluster.fork([env])

cluster.disconnect([callback])

cluster events

worker.id

worker.process

worker.suicide

worker.send(message, [sendHandle])

worker.kill([signal])

worker.disconnect()

Scaling horizontally across different machines

Using Nginx

Deploying an Nginx load balancer on DigitalOcean

Installing and configuring Nginx

Load balancing with Node

Using node-http-proxy

Using message queues

Using Node's UDP Module

Summary

4. Managing Memory and Space

Dealing with large crowds

Microservices

Redis pub/sub

Microservices with Seneca

Reducing memory usage

Use streams, not buffers

Understanding prototypes

Memory-efficient data structures with Redis

Using bitwise operations to analyze user actions over time

Setting, getting, and counting bits

Bitmasks and filtering results

Using HyperLogLog to count unique anonymous visitors

Taming V8 and optimizing performance

Optimizing JavaScript

Numbers and tracing optimization/de-optimization

Objects and arrays

Functions

Caching strategies

Using Redis as a cache

Deploying CloudFlare as a CDN

Managing sessions

JSON Web Token authentication and sessions

Summary

5. Monitoring Applications

Dealing with failure

The 'domain' module

Catching process errors

Logging

Logging with UDP

Logging with Morgan

Modifying behavior in changing environments

Node REPL

Remotely monitoring and managing Node processes

Profiling processes

Using third-party monitoring tools

PM2

Monitoring

Nodetime

Using New Relic for monitoring

Summary

6. Building and Testing

Building with Gulp, Browserify, and Handlebars

Using Gulp

Erecting a build scaffold

Running and testing your build

Using Node's native testing tools

The Node debugger

The 'assert' module

Testing with Mocha, Chai, Sinon, and npm

Mocha

Chai

Sinon

Spies

Stubs

Mocks

Automated browser testing with PhantomJS and CasperJS

Headless testing with PhantomJS

Navigation scenarios with CasperJS

Summary

7. Deploying and Maintaining

Using GitHub webhooks

Enabling webhooks

Implementing a build/deploy system using webhooks

Synchronizing local and deployed builds

Developing locally with Vagrant

Provisioning with Ansible

Integrating, delivering, and deploying

Continuous integration

Continuous delivery

Continuous deployment

Building and deploying with Jenkins

Deploying to Heroku

Package maintenance

Understanding Semver

Managing packages with npm

Designing a dependency tree

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部