Practical Node.js : building real-world scalable web apps /
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. As a web developer, you'll work with a varied collection of standards and frameworks - Practical Node.js shows you how all those pieces fit to...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Berkeley, CA :
Apress,
2014.
|
Colección: | Expert's voice in Web development.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Machine generated contents note: Installing Node.js and NPM
- One-Click Installers
- Installing with HomeBrew or MacPorts
- Installing from a Tar File
- Installing Without sudo
- Installing from a Git Repo
- Multiversion Setup with Nave
- Multiversion Setup with NVM
- Alternative Multiversion Systems
- 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
- Arrays
- Prototypal Nature
- Conventions
- Node.js Globals and Reserved Keywords
- dirname vs. process.cwd
- Browser Application Programming Interface Helpers
- Node.js Core Modules
- 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
- What Is Express.js?
- How Express.js Works
- Express.js Installation
- Express.js Version
- Express.js Generator
- Local Express.js
- Express.js Scaffolding
- Express.js Command-Line Interface
- Routes in Express.js
- Middleware as the Backbone of Express.js
- Configuration of an Express.js App
- Jade Is Haml for Express.js/Node.js
- Conclusion About Scaffolding
- Blog Project Overview
- Submitting the Data
- Express.js 4 Hello World Example
- Setting up Folders
- NPM Init and package.json
- Dependency Declaration: npm install
- App.js File
- Meet Jade: One Template to Rule Them All
- Running the Hello World App
- Summary
- Installing and Understanding Mocha
- Understanding Mocha Hooks
- TDD with the Assert
- Chai Assert
- BDD with Expect.js
- Expect.js Syntax
- Project: Writing the First BDD Test for Blog
- Putting Configs into a Makefile
- Summary
- Jade 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 Jade Usage
- Handlebars Syntax
- Variables
- Iteration (each)
- Unescaped Output
- Conditions (if)
- Unlesi
- With
- Comments
- Custom Helpers
- Includes (Partials)
- Standalone Handlebars Usage
- Jade and Handlebars Usage in Express.js 4
- Jade and Express.js
- Handlebars and Express.js
- Project: Adding Jade Templates to Blog
- layout.jade
- index.jade
- article.jade
- logi n.jade
- post.jade
- admin.jade
- Summary
- Easy and Proper Installation of MongoDB
- How to Run the Mongo Server
- Data Manipulation from the Mongo Console
- MongoDB Shell in Detail
- Minimalistic Native MongoDB Driver for Nodijs 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
- Authorization with Express.js Middleware
- Token-Based Authentication
- Session-Based Authentication
- Project: Adding E-mail and Password Login to Blog
- Session Middleware
- Authorization in Blog
- Authentication in Blog
- Running the App
- Node.js OAuth
- 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
- Mongoose Installation
- Connection Establishment 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
- RESTful API Basics
- Project Dependencies
- Test Coverage with Mocha and Superagent
- REST API Server Implementation with Express and Mongoskin
- Refactoring: Hapi RESP API Server
- Summary
- 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
- Environment Variables
- Express.js in Production
- Socket. IO in Production
- Error Handling
- Node.js Domains for Error Handling
- Multithreading with Cluster
- Multithreading with Cluster2
- Event Logging and Monitoring
- Monitoring
- REPL in Production
- Winston
- Papertrail App for Logging
- Building Tasks with Grunt
- 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 TravisCl
- TravisCI Configuration
- Summary
- 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
- Recommended Folder Structure
- Required Patterns
- package.json
- Publishing to NPM
- Locking Versions
- Summary
- Practical Node.js Conclusion
- Further Reading
- Errata and Contacts.