更新时间:2021-08-13 16:47:04
封面
版权信息
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Chapter 1. About Node
The capabilities of Node
Why should you use Node?
What's in a name – Node Node.js or Node.JS?
Summary
Chapter 2. Setting up Node
System requirements
Installing Node using package managers
Installing the StrongLoop Node distribution
Installing from source on POSIX-like systems
Installing developer tools on Mac OS X
Run a few commands; testing the commands
npm – the Node package manager
Starting Node servers at system startup
Chapter 3. Node Modules
Defining a module
Node package manager
Chapter 4. HTTP Servers and Clients – A Web Application's First Steps
Sending and receiving events with EventEmitters
HTTP server applications
HTTP Sniffer – listening to the HTTP conversation
Web application frameworks
Getting started with Express
Calculating the Fibonacci sequence with Express
Making HTTP Client requests
Calling a REST backend service from an Express application
Chapter 5. Implementing a Simple Express Application
Express and the MVC paradigm
Creating the Notes application code
Changing the look of an Express application
Scaling up and running multiple instances
Chapter 6. Data Storage and Retrieval
Asynchronizing the Notes application
Storing notes in files
Storing notes with the LevelUP data store
Storing notes in SQL – SQLite3
Storing notes the ORM way with the Sequelize module
Storing notes in MongoDB with Mongoose
Chapter 7. Multiuser Authorization Deployment Scaling and Hosting
User authentication
Deploying Notes on Debian
Scaling to use all cores on multi-core servers
Deploying Notes on cloud hosting (AppFog)
Chapter 8. Dynamic Interaction between the Client and Server Application
Adding real-time web features to Notes
Introducing Socket.IO
Initializing Socket.IO with Express
Events between the Notes server and client code
Running the Notes application with Socket.IO
Sending messages between users
Chapter 9. Unit Testing
Testing asynchronous code
Assert – the simplest testing methodology
Testing a model
Testing router functions
Making it easy to run the tests
Index