Express Web Application Development
eBook - ePub

Express Web Application Development

  1. 236 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Express Web Application Development

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications. It provides a thin layer of features fundamental to any web application, without obscuring features that developers know and love in node.js.

"Express Web Application Development" is a comprehensive guide for those looking to learn how to use the Express web framework for web application development.

Starting with the initial setup of the Express web framework, "Express Web Application Development" helps you to understand the fundamentals of the framework. By the end of "Express Web Application Development", you will have acquired enough knowledge and skills to create production-ready Express apps. All of this is made possible by the incremental introduction of more advanced topics, starting from the very essentials.

On the way to mastering Express for application development, we teach you the more advanced topics such as routes, views, middleware, forms, sessions, cookies and various other aspects of configuring an Express application. Jade; the recommended HTML template engine, and Stylus; the CSS pre-processor for Express, are covered in detail.

Last, but definitely not least, Express Web Application Development also covers practices and setups that are required to make Express apps production-ready.

Approach

"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.

Who this book is for

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.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Express Web Application Development by Hage Yaapa in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in JavaScript. We have over one million books available in our catalogue for you to explore.

Information

Year
2013
ISBN
9781849696548
Edition
1

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
Bench...

Table of contents

  1. Express Web Application Development