Index
A
- app.all() method / Defining routes for the app
- app.configure() method / Express in different environments
- app.configure([env], callback) / The application object
- app.disable(name) / The application object
- app.disabled(name) / The application object
- app.enable(name) / The application object
- app.enabled(name) / The application object
- app.engine(ext, callback) / The application object
- app.get(name) / The application object
- app.listen() / The application object
- app.locals / The application object
- app.param([name], callback) / The application object
- app.render(view, [options], callback) / The application object
- app.routes / The application object
- app.set() method / JSONP
- app.set(name, value) / The application object
- app.use() method / Middlewares
- app.use([path], function) / The application object
- app.VERB(path, [callback...], callback) / The application object
- app cluster
- creating / Creating an app cluster
- application object, Express / The application object
- app.set(name, value) / The application object
- app.get(name) / The application object
- app.enable(name) / The application object
- app.disable(name) / The application object
- app.enabled(name) / The application object
- app.disabled(name) / The application object
- app.configure([env], callback) / The application object
- app.use([path], function) / The application object
- app.engine(ext, callback) / The application object
- app.param([name], callback) / The application object
- app.VERB(path, [callback...], callback) / The application object
- app.all(path, [callback...], callback) / The application object
- app.locals / The application object
- app.render(view, [options], callback) / The application object
- app.routes / The application object
- app.listen() / The application object
- Asynchronous (async) JavaScript / Asynchronous JavaScript
- Availability field / Benchmarking the app
B
- -b option / Benchmarking the app
- bar notation / Creating text content
- basicAuth middleware / Empowering Express with middlewares
- benchmarking
- app / Benchmarking the app
- fields / Benchmarking the app
- benchmarking, fields
- transaction field / Benchmarking the app
- Availability field / Benchmarking the app
- Elapsed time field / Benchmarking the app
- Data transferred field / Benchmarking the app
- Response time option / Benchmarking the app
- Transaction rate option / Benchmarking the app
- Throughput option / Benchmarking the app
- Concurrency option / Benchmarking the app
- Successful transactions option / Benchmarking the app
- Failed transactions option / Benchmarking the app
- Longest transaction option / Benchmarking the app
- Shortest transaction option / Benchmarking the app
- bodyParser middleware / Empowering Express with middlewares, Enabling POST data parsing
- built-in functions
- about / Built-in functions
C
- -c option / Benchmarking the app
- @css rule / @css
- case sensitive routing option / Setting and getting application options
- classes, HTML tags
- assigning / Assigning classes
- Client Error / 4xx
- close() method / Closing the server
- cluster
- about / Creating an app cluster
- comments
- about / Comments
- comments, Jade / Comments
- compile option / Enabling Stylus in Express
- compress middleware / Empowering Express with middlewares
- compress option / Enabling Stylus in Express
- Concurrency option / Benchmarking the app
- conditionals
- about / Conditionals
- if, else if, and else construct / if, else if, and else
- unless conditional / unless
- Connect project / The story of Express
- Content-Type header / Media types, Plain text
- content negotiation / Content negotiation
- control structures, Jade
- about / Control structures
- cookie-based session
- about / Cookie-based sessions
- key option / Cookie-based sessions
- secret option / Cookie-based sessions
- cookie option / Cookie-based sessions
- proxy option / Cookie-based sessions
- deleting / Deleting a cookie-based session
- cookieParser middleware / Empowering Express with middlewares, Using cookies to store data, Cookie-based sessions
- cookies
- using, to store data / Using cookies to store data
- creating / Creating cookies
- setting / Creating cookies
- reading / Reading cookies
- updating / Updating cookies
- session cookies / Session cookies
- signed cookies / Signed cookies
- deleting / Deleting cookies
- cookieSession middleware / Empowering Express with middlewares
- cron job / Upstart
D
- -date token / Logging requests to the App
- data
- sending / Sending data
- plain text / Plain text
- HTML / HTML
- JSON / JSON
- JSONP / JSONP
- static files, serving / Serving static files
- files, serving programmatically / Serving files programmatically
- error pages, serving / Serving error pages
- content negotiation / Content negotiation
- request, redirecting / Redirecting a request
- submitting, forms used / Using forms to submit data
- submitting, simulated methods used / Submission via simulated methods
- in named segments / Data in named segments
- reading / Reading data
- Data transferred field / Benchmarking the app
- dest option / Enabling Stylus in Express
- directory middleware / Empowering Express with middlewares
- disconnect event / Using domains to handle uncaught errors
- Doctype
- of document, declaring / Declaring the document's Doctype
- predefined values / Declaring the document's Doctype
- domains
- used, for handling uncaught errors / Using domains to handle uncaught errors
- URL / Using domains to handle uncaught errors
E
- @extend rule / @extend
- each construct / each
- Elapsed time field / Benchmarking the app
- environments
- about / Express in different environments
- env option / Setting and getting application options
- error event / What to do in case of uncaught errors – to terminate the process or not to terminate?
- errorHandler middleware / Empowering Express with middlewares
- error pages
- serving / Serving error pages
- escaping, Jade / Escaping
- expires option / Session cookies
- exports object / Node modules
- Express
- about / What is Express?
- history / The story of Express
- installing / Installing Express
- components / The stuff that makes up Express
- HTTP status codes / HTTP status codes
- HTTP response headers / HTTP response headers
- HTTP response / HTTP response in Express
- Stylus, enabling / Enabling Stylus in Express
- production environment / What the is production environment?
- Express, components
- application object / The application object
- request object / The request object
- response object / The response object
- Asynchronous (async) JavaScript / Asynchronous JavaScript
- node module / Node modules
- Express app
- about / Your first Express app
- manifest file / The Express manifest file
- creating / A very basic Express app
- starting / Starting and stopping the app
- stopping / Starting and stopping the app
- output, analyzing / Analyzing the output
- with views / Express app with views
- public directory / A public directory for the app
- auto-generating / Auto-generating an Express app
- middlewares / Empowering Express with middlewares
- Node modules / Empowering Express with Node modules
- requests, logging to / Logging requests to the App
- configuration file used / Using a configuration file
- options, setting / Setting and getting application options
- options, getting / Setting and getting application options
- configuration, options / Setting and getting application options
- in different environments / Express in different environments
- Express App
- about / Express apps are Node modules
- express command-line tool / Installing Express
F
- $ forever restart <process index> command / Forever
- $ forever start app.js command / Forever
- $ forever stop <process index> command / Forever
- @font-face rule / @font-face
- Failed transactions option / Benchmarking the app
- favicon middleware / Empowering Express with middlewares
- file uploads
- handling / Handling file uploads
- filters, Jade
- about / Filters
- firebug option / Enabling Stylus in Express
- forbidder middleware / Middlewares
- force option / Enabling Stylus in Express
- for construct / for
- Forever
- installing / Forever
- $ forever start app.js command / Forever
- $ forever stop <process index> command / Forever
- $ forever restart <process index> command / Forever
- for loop / JavaScript constructs
- forms
- used, for submitting data / Using forms to submit data
- functions
- about / Functions
G
- -g option / Installing Express
- GET HTTP method / Using forms to submit data
- GET request / What is Jade?
- GET submissions
- handling / Handling GET submissions
- form data, reading / Reading form data
- URL query parameters, reading / Reading URL query parameters
- multiple options, handling / Handling multiple options
- global modules / Installing Express
H
- -http-version token / Logging requests to the App
- HAProxy
- URL / Using a reverse proxy
- HTML / HTML
- HTML attributes / Specifying HTML attributes
- HTML elements
- hierarchy / Hierarchy of HTML elements
- HTML tags
- generating / Generating HTML tags
- HTML elements, hierarchy / Hierarchy of HTML elements
- IDs, assigning / Assigning IDs
- classes, assigning / Assigning classes
- HTML attributes, specifying / Specifying HTML attributes
- http.createServer() method / Closing the server
- HTTP headers
- setting / Setting HTTP headers
- HTTP method overriding / Submission via simulated methods
- HTTP protocol
- URL / A primer on HTTP response
- HTTP request method / What are Routes?
- HTTP response
- about / A primer on HTTP response
- in Express / HTTP response in Express
- HTTP response, in Express
- HTTP status code, setting / Setting the HTTP status code
- HTTP headers, setting / Setting HTTP headers
- data, sending / Sending data
- HTTP response headers
- about / HTTP response headers
- HTTP response message
- about / A primer on HTTP response
- HTTP Server object
- URL / Closing the server
- HTTP status code
- setting / Setting the HTTP status code
- HTTP status codes
- about / HTTP status codes
- 1xx status code / 1xx
- 2xx status code / 2xx
- 3xx status code / 3xx
- 4xx status code / 4xx
- 5xx status code / 5xx
- HTTP verbs
- about / A quick introduction to HTTP verbs
I
- @import rule / @import
- IDs, HTML tags
- assigning / Assigning IDs
- if (cluster.isMaster) bock / Creating an app cluster
- if, else if, and else combination / if, else if, and else
- if, else if, and else construct / if, else if, and else
- includes / Includes
- Informational / 1xx
- installation
- Express / Installing Express
- Internet Engineering Task Force (IETF) / A quick introduction to HTTP verbs
- interpolations, Jade
- about / Interpolation
J
- Jade
- about / What is Jade?
- URL / What is Jade?
- HTML tags, generating / Generating HTML tags
- filters / Filters
- programmability / Programmability in Jade
- variables / Variables
- interpolation / Interpolation
- control structures / Control structures
- modularization / Modularization
- escaping / Escaping
- comments / Comments
- Jade constructs
- about / Jade constructs
- if, else if, and else combination / if, else if, and else
- for construct / for
- each construct / each
- while construct / while
- unless construct / unless
- case construct / case
- Jade view, modularization
- includes / Includes
- template inheritance / Template inheritance
- mixins / Mixins
- JavaScript constructs
- about / JavaScript constructs
- JSON / JSON
- json middleware / Empowering Express with middlewares
- JSONP / JSONP
- jsonp callback name option / Setting and getting application options
- json replacer option / Setting and getting application options
- json spaces option / Setting and getting application options
K
- @keyframe rule / @keyframes
- keepExtensions property / Enabling POST data parsing
- keys(list) tuple / Listed tuples
L
- layout.jade file / Auto-generating an Express app
- limit middleware / Empowering Express with middlewares
- linenos option / Enabling Stylus in Express
- lists
- about / Lists
- literals
- about / Literals
- local modules / Installing Express
- logger
- about / Logging requests to the App
- logger middleware / Empowering Express with middlewares
- Longest transaction option / Benchmarking the app
M
- -method token / Logging requests to the App
- @media rule / @media
- manifest file
- name field / The Express manifest file
- version field / The Express manifest file
- private field / The Express manifest file
- scripts field / The Express manifest file
- dependencies field / The Express manifest file
- media types
- about / Media types
- MemoryStore
- about / MemoryStore
- MethodOverride middleware / Using forms to submit data
- methodOverride middleware / Empowering Express with middlewares, Submission via simulated methods
- middleware
- about / Middlewares
- middleware() method / Enabling Stylus in Express
- middlewares
- about / Empowering Express with middlewares
- router / Empowering Express with middlewares
- logger / Empowering Express with middlewares
- compress / Empowering Express with middlewares
- basicAuth / Empowering Express with middlewares
- json / Empowering Express with middlewares
- urlencoded / Empowering Express with middlewares
- multipart / Empowering Express with middlewares
- bodyParser / Empowering Express with middlewares
- timeout / Empowering Express with middlewares
- cookieParser / Empowering Express with middlewares
- session / Empowering Express with middlewares
- cookieSession / Empowering Express with middlewares
- methodOverride / Empowering Express with middlewares
- responseTime / Empowering Express with middlewares
- static / Empowering Express with middlewares
- staticCache / Empowering Express with middlewares
- directory / Empowering Express with middlewares
- vhost / Empowering Express with middlewares
- favicon / Empowering Express with middlewares
- limit / Empowering Express with middlewares
- query / Empowering Express with middlewares
- errorHandler / Empowering Express with middlewares
- mixins / Mixins
- about / Mixins
- module.exports property / Node modules
- MongoStore
- about / MongoStore
- installing, in application directory / MongoStore
- multipart middleware / Empowering Express with middlewares
N
- named segments
- data in / Data in named segments
- name property / Handling file uploads
- Namespaced routing / Namespaced routing
- nginx
- URL / Using a reverse proxy
- Node.js (Node) platform / What is Express?
- Node HTTP API / Node HTTP/HTTPS API
- Node HTTPS API / Node HTTP/HTTPS API
- node module
- about / Node modules
- Node modules
- about / Empowering Express with Node modules
- using / Using Node modules
- NODE_ENV / Express in different environments
- NODE_ENV environment variable / What the is production environment?
- npm
- about / Installing Express
- npm install command / Installing Express
- nvm
- about / Installing Express
O
- operators
- about / Operators
P
- @ parameter / Installing Express
- path property / Handling file uploads
- performance
- about / Benchmarking the app
- post() method / Using forms to submit data
- POST HTTP method / Using forms to submit data
- Postman / Defining routes for the app
- POST submissions
- handling / Handling POST submissions
- POST data parsing, enabling / Enabling POST data parsing
- form data, reading / Reading form data
- text-only forms, handling / Handling text-only forms
- file uploads, handling / Handling file uploads
- process.nextTick() / Handling uncaught errors
- process termination
- handling / Handling process termination
- production environment
- about / What the is production environment?
- changes / What changes in production mode?
- simulating / Simulating production environment
Q
- query middleware / Empowering Express with middlewares
R
- -referrer token / Logging requests to the App
- -remote-addr token / Logging requests to the App
- -req[header] token / Logging requests to the App
- -response-time token / Logging requests to the App
- -res[header] token / Logging requests to the App
- Redirection / 3xx
- RedisStore
- about / RedisStore
- installing, in application directory / RedisStore
- req.accepted / The request object
- req.acceptedCharsets / The request object
- req.acceptedLanguages / The request object
- req.accepts(types) / The request object
- req.acceptsCharsets(charset) / The request object
- req.acceptsLanguage(langauge) / The request object
- req.body / The request object
- req.cookies / The request object
- req.cookies object / Using cookies to store data
- req.files / The request object
- req.files object / More about file uploads
- req.fresh / The request object
- req.get(header) / The request object
- req.host / The request object
- req.ip / The request object
- req.ips / The request object
- req.ips property / The trust proxy option
- req.is(type) / The request object
- req.originalUrl / The request object
- req.param() method / Reading data
- req.params / The request object
- req.params(name) / The request object
- req.path / The request object
- req.protocol / The request object
- req.query / The request object
- req.query object / Reading URL query parameters
- req.route / The request object
- req.secure / The request object
- req.signedCookies / The request object
- req.stale / The request object
- req.subdomains / The request object
- req.url / The request object
- req.xhr / The request object
- req parameter / Middlewares
- request
- redirecting / Redirecting a request
- request flow
- about / Request flow
- request object, Express
- req.params / The request object
- req.params(name) / The request object
- req.query / The request object
- req.body / The request object
- req.files / The request object
- req.route / The request object
- req.cookies / The request object
- req.signedCookies / The request object
- req.get(header) / The request object
- req.accepts(types) / The request object
- req.accepted / The request object
- req.is(type) / The request object
- req.ip / The request object
- req.ips / The request object
- req.path / The request object
- req.host / The request object
- req.fresh / The request object
- req.stale / The request object
- req.xhr / The request object
- req.protocol / The request object
- req.secure / The request object
- req.subdomains / The request object
- req.url / The request object
- req.originalUrl / The request object
- req.acceptedLanguages / The request object
- req.acceptsLanguage(langauge) / The request object
- req.acceptedCharsets / The request object
- req.acceptsCharsets(charset) / The request object
- require() function / Node modules
- res.attachment([filename]) / The response object
- res.charset / The response object
- res.clearCookie() method / Deleting cookies
- res.clearCookie(name, [options]) / The response object
- res.cookie() method / Using cookies to store data, Creating cookies
- path option / Creating cookies
- secure option / Creating cookies
- expires option / Creating cookies
- maxAge option / Creating cookies
- httpOnly option / Creating cookies
- signed option / Creating cookies
- res.cookie() method domain option / Creating cookies
- res.cookie(name, value, [options]) / The response object
- res.download() method / Setting the HTTP status code, Serving files programmatically
- res.download(path, [filename], [callback]) / The response object
- res.format(object) / The response object
- res.get(header) / The response object
- res.json() method / Setting the HTTP status code
- res.json([status|body], [body]) / The response object
- res.jsonp() method / Setting the HTTP status code
- res.jsonp([status|body], [body]) / The response object
- res.links(links) / The response object
- res.locals / The response object
- res.location / The response object
- res.redirect([status], url) / The response object
- res.render() method / Setting the HTTP status code, Variables
- res.render(view, [locals], callback) / The response object
- res.send() method / Setting the HTTP status code
- res.send([body|status], [body]) / The response object
- res.sendfile() method / Setting the HTTP status code, Serving files programmatically
- res.sendfile(path, [options], [callback]]) / The response object
- res.set() method / Setting HTTP headers, Plain text
- res.set(field, [value]) / The response object
- res.status() method / Setting the HTTP status code
- res.status(code) / The response object
- res.type(type) / The response object
- Resourceful routing / Resourceful routing
- response object, Express
- res.status(code) / The response object
- res.set(field, [value]) / The response object
- res.get(header) / The response object
- res.cookie(name, value, [options]) / The response object
- res.clearCookie(name, [options]) / The response object
- res.redirect([status], url) / The response object
- res.location / The response object
- res.charset / The response object
- res.send([body|status], [body]) / The response object
- res.json([status|body], [body]) / The response object
- res.jsonp([status|body], [body]) / The response object
- res.type(type) / The response object
- res.format(object) / The response object
- res.attachment([filename]) / The response object
- res.sendfile(path, [options], [callback]]) / The response object
- res.download(path, [filename], [callback]) / The response object
- res.links(links) / The response object
- res.locals / The response object
- res.render(view, [locals], callback) / The response object
- responseTime middleware / Empowering Express with middlewares
- Response time option / Benchmarking the app
- restart myapp command / Upstart
- reverse proxy
- using / Using a reverse proxy
- tasks / Using a reverse proxy
- route handler
- about / Request flow
- router middleware / Empowering Express with middlewares, Handling uncaught errors
- about / Revisiting the router middleware
- router middleware / Serving error pages
- routes
- about / What are Routes?
- defining, for app / Defining routes for the app
- identifiers / Route identifiers
- precedence order / Order of route precedence
- handling / How to handle routes
- organizing / How to organize routes
- routes, organizing
- Node modules SED / Using Node modules
- Namespaced routing / Namespaced routing
- Resourceful routing / Resourceful routing
- routes.js Node module
- content / Request flow
- rules
- about / Rules
- @import / @import
- @import rule / @import
- @media rule / @media
- @font-face rule / @font-face
- @keyframe rule / @keyframes
- @extend rule / @extend
- @css rule / @css
- run() method / Using domains to handle uncaught errors
S
- -status token / Logging requests to the App
- .styl file extension / Introduction
- script tag / Creating text content
- Selectors
- about / Selectors
- blocks / Selector blocks
- hierarchy / Hierarchy
- serve option / Enabling Stylus in Express
- server
- closing / Closing the server
- Server Error / 5xx
- session cookies / Session cookies
- session middleware / Empowering Express with middlewares
- sessions
- using, to store data / Using sessions to store data
- cookie-based session / Cookie-based sessions
- session store-based session / Session store-based sessions
- session variables / Session variables
- deleting / Deleting a session
- session store-based session
- about / Session store-based sessions
- key option / Session store-based sessions
- store option / Session store-based sessions
- secret option / Session store-based sessions
- cookie option / Session store-based sessions
- proxy option / Session store-based sessions
- deleting / Deleting a session store-based session
- session variables
- about / Session variables
- setting / Setting session variables
- reading / Reading session variables
- updating / Updating session variables
- deleting / Deleting session variables
- Shortest transaction option / Benchmarking the app
- siege
- installing, in Ubuntu / Benchmarking the app
- about / Benchmarking the app
- siege --help command / Benchmarking the app
- siege tool / Benchmarking the app
- SIGKILL
- URL / Handling process termination
- signed cookies / Signed cookies
- size property / Handling file uploads
- skeleton app / Auto-generating an Express app
- src option / Enabling Stylus in Express
- start myapp command / Upstart
- staticCache middleware / Empowering Express with middlewares
- static files
- serving / Serving static files
- static middleware / Empowering Express with middlewares, Enabling Stylus in Express
- stop myapp command / Upstart
- strict routing option / Setting and getting application options
- style.styl / @import
- style tag / Creating text content
- Stylus
- about / Introduction, Mixins
- URL / Introduction
- .styl file extension / Introduction
- enabling, in Express / Enabling Stylus in Express
- serve option / Enabling Stylus in Express
- force option / Enabling Stylus in Express
- src option / Enabling Stylus in Express
- dest option / Enabling Stylus in Express
- compile option / Enabling Stylus in Express
- compress option / Enabling Stylus in Express
- firebug option / Enabling Stylus in Express
- linenos option / Enabling Stylus in Express
- variables / Variables
- literals / Literals
- lists / Lists
- tuples / Tuples
- tuples, listed / Listed tuples
- functions / Functions
- comments / Comments
- operators / Operators
- conditionals / Conditionals
- builtin functions / Built-in functions
- Success / 2xx
- Successful transactions option / Benchmarking the app
T
- -t option / Benchmarking the app
- template inheritance / Template inheritance
- text-only forms
- handling / Handling text-only forms
- text content
- creating / Creating text content
- Throughput option / Benchmarking the app
- timeout middleware / Empowering Express with middlewares
- transaction field / Benchmarking the app
- Transaction rate option / Benchmarking the app
- trust proxy application
- about / The trust proxy option
- trust proxy option / Setting and getting application options
- try-catch
- used, for catching uncaught errors / Using try-catch to catch uncaught errors
- tuples
- about / Tuples
- listing / Listed tuples
- keys(list) / Listed tuples
- values(list) / Listed tuples
- type property / Handling file uploads
U
- -url token / Logging requests to the App
- -user-agent token / Logging requests to the App
- uncaught error
- handling / Handling uncaught errors
- example / Handling uncaught errors
- uncaught errors
- catching, try-catch used / Using try-catch to catch uncaught errors
- handling, domains used / Using domains to handle uncaught errors
- process, terminating / What to do in case of uncaught errors – to terminate the process or not to terminate?
- process termination, handling / Handling process termination
- uncaughtException / Using domains to handle uncaught errors
- unless conditional / unless
- unless construct / unless
- uploadDir option / More about file uploads
- uploadDir property / Enabling POST data parsing
- Upstart
- about / Upstart
- start myapp command / Upstart
- restart myapp command / Upstart
- stop myapp command / Upstart
- URL / Upstart
- uptime
- ensuring / Ensuring uptime
- urlencoded middleware / Empowering Express with middlewares
- urlencoded string / Using forms to submit data
- URL query parameters
- reading / Reading URL query parameters
- UTF-8 / Media types
V
- values(list) tuple / Listed tuples
- variables
- about / Variables, Variables
- vhost middlewares / Empowering Express with middlewares
- view cache option / Setting and getting application options
- view engine option / Setting and getting application options
- views
- Express app with / Express app with views
- views option / Setting and getting application options
W
- while construct / while
X
- 1xx status code / 1xx
- 2xx status code / 2xx
- 3xx status code / 3xx
- 4xx status code / 4xx
- 5xx status code / 5xx