万本电子书0元读

万本电子书0元读

顶部广告

Express Web Application Development电子书

售       价:¥

7人正在读 | 0人评论 9.8

作       者:Hage Yaapa

出  版  社:Packt Publishing

出版时间:2013-06-25

字       数:152.8万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Express Web Application Development is a practical introduction to learning about Express. Each chapter introduces you to a different area of Express, using screenshots and examples to get you up and running as quickly as possible.If you are looking to use Express to build your next web application, "Express Web Application Development" will help you get started and take you right through to Express' advanced features. You will need to have an intermediate knowledge of JavaScript to get the most out of this book.
目录展开

Express Web Application Development

Table of Contents

Express Web Application Development

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

Downloading the example code

Customer support

Errata

Piracy

Questions

1. What is Express?

What is Express?

The story of Express

Installing Express

The stuff that makes up Express

The application object

The request object

The response object

Concepts used in Express

Asynchronous JavaScript

Node modules

Express apps are Node modules

Middlewares

Request flow

Node HTTP/HTTPS API

Summary

2. Your First Express App

Your first Express app

The Express manifest file

A very basic Express app

Starting and stopping the app

Analyzing the output

Express app with views

A public directory for the app

Auto-generating an Express app

Empowering Express with middlewares

Empowering Express with Node modules

Logging requests to the App

Using a configuration file

Setting and getting application options

Express in different environments

Summary

3. Understanding Express Routes

What are Routes?

A quick introduction to HTTP verbs

Revisiting the router middleware

Defining routes for the app

Route identifiers

Order of route precedence

How to handle routes

How to organize routes

Using Node modules

Namespaced routing

Resourceful routing

Making a choice

Summary

4. Response From the Server

A primer on HTTP response

HTTP status codes

1xx

2xx

3xx

4xx

5xx

HTTP response headers

Media types

HTTP response in Express

Setting the HTTP status code

Setting HTTP headers

Sending data

Plain text

HTML

JSON

JSONP

Serving static files

Serving files programmatically

Serving error pages

Content negotiation

Redirecting a request

Summary

5. The Jade Templating Language

What is Jade?

Generating HTML tags

Hierarchy of HTML elements

Assigning IDs

Assigning classes

Specifying HTML attributes

Creating text content

Filters

Declaring the document's Doctype

Programmability in Jade

Variables

Interpolation

Control structures

JavaScript constructs

Jade constructs

if, else if, and else

for

each

while

unless

case

Modularization

Includes

Template inheritance

Mixins

Escaping

Comments

Summary

6. The Stylus CSS Preprocessor

Introduction

Enabling Stylus in Express

Selectors

Selector blocks

Hierarchy

Rules

@import

@media

@font-face

@keyframes

@extend

@css

Programmability

Variables

Literals

Lists

Tuples

Listed tuples

Mixins

Functions

Comments

Operators

Conditionals

if, else if, and else

unless

Built-in functions

Summary

7. Forms, Cookies, and Sessions

Using forms to submit data

Handling GET submissions

Reading form data

Reading URL query parameters

Handling multiple options

Handling POST submissions

Enabling POST data parsing

Reading form data

Handling text-only forms

Handling file uploads

More about file uploads

Submission via simulated methods

Data in named segments

Reading data

Using cookies to store data

Creating cookies

Reading cookies

Updating cookies

Session cookies

Signed cookies

Deleting cookies

Using sessions to store data

Cookie-based sessions

Session store-based sessions

MemoryStore

RedisStore

MongoStore

Session variables

Setting session variables

Reading session variables

Updating session variables

Deleting session variables

Deleting a session

Deleting a cookie-based session

Deleting a session store-based session

Summary

8. Express in Production

What the is production environment?

What changes in production mode?

Simulating production environment

Benchmarking the app

Creating an app cluster

Handling critical events

Closing the server

Handling uncaught errors

Using try-catch to catch uncaught errors

Using domains to handle uncaught errors

What to do in case of uncaught errors – to terminate the process or not to terminate?

Handling process termination

Ensuring uptime

Forever

Upstart

Using a reverse proxy

The trust proxy option

Summary

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部