Express.js Blueprints

Learn to use Express.js pragmatically by creating five fun and robust real-world APIs, with a bonus chapter on Koa.js
Preview in Mapt

Express.js Blueprints

Ben Augarten et al.

Learn to use Express.js pragmatically by creating five fun and robust real-world APIs, with a bonus chapter on Koa.js
Mapt Subscription
FREE
$29.99/m after trial
eBook
$16.80
RRP $23.99
Save 29%
Print + eBook
$29.99
RRP $29.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$16.80
$29.99
$29.99 p/m after trial
RRP $23.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Express.js Blueprints Book Cover
Express.js Blueprints
$ 23.99
$ 16.80
Python Programming Blueprints Book Cover
Python Programming Blueprints
$ 39.99
$ 28.00
Buy 2 for $34.30
Save $29.68
Add to Cart

Book Details

ISBN 139781783983025
Paperback198 pages

Book Description

APIs are at the core of every serious web application. Express.js is the most popular framework for building on top of Node.js, an exciting tool that is easy to use and allows you to build APIs and develop your backend in JavaScript. Express.js Blueprints consists of many well-crafted tutorials that will teach you how to build robust APIs using Express.js.

The book covers various different types of applications, each with a diverse set of challenges. You will start with the basics such as hosting static content and user authentication and work your way up to creating real-time, multiplayer online games using a combination of HTTP and Socket.IO. Next, you'll learn the principles of SOA in Node.js and see them used to build a pairing as a service. If that's not enough, we'll build a CRUD backend to post links and upvote with Koa.js!

Table of Contents

Chapter 1: Building a Basic Express Site
Setting up Express for a static site
Local user authentication
OAuth with passport
Profile pages
Testing
Automate builds and deploys
Summary
Chapter 2: A Robust Movie API
Folder structure and organization
Responding to CRUD operations
Object modeling with Mongoose
Generating unique IDs
Validating your database
Extracting functions to reusable middleware
Testing
Summary
Chapter 3: Multiplayer Game API – Connect 4
Modeling game state with Mongoose
Creating a new game
Summary
Chapter 4: MMO Word Game
Gameplay
Schema design
Promises
Socket.IO
Summary
Chapter 5: Coffee with Strangers
Code structure
Defining routes
Persisting data
Naive pairing
Considering user history
Optimizing for distance
E-mail follow up
Periodical tasks with node-cron
Summary
Chapter 6: Hacker News API on Koa.js
Generator syntax
Validation and error handling
Update route
Let's perform some tests
Summary

What You Will Learn

  • Set up the Express.js framework with a basic scaffold
  • Model data using Mongoose and build a CRUD API to store the data in a database
  • Use promises to avoid callback hell in Node.js
  • Address scalability concerns and deal with race conditions
  • Apply test-driven development (TDD) by using Mocha to write tests for your apps
  • Get familiar with service-oriented architecture (SOA)
  • Integrate Socket.IO and dynamically push updates to the client
  • Write Node.js APIs by leveraging generator functions using Koa.js

Authors

Table of Contents

Chapter 1: Building a Basic Express Site
Setting up Express for a static site
Local user authentication
OAuth with passport
Profile pages
Testing
Automate builds and deploys
Summary
Chapter 2: A Robust Movie API
Folder structure and organization
Responding to CRUD operations
Object modeling with Mongoose
Generating unique IDs
Validating your database
Extracting functions to reusable middleware
Testing
Summary
Chapter 3: Multiplayer Game API – Connect 4
Modeling game state with Mongoose
Creating a new game
Summary
Chapter 4: MMO Word Game
Gameplay
Schema design
Promises
Socket.IO
Summary
Chapter 5: Coffee with Strangers
Code structure
Defining routes
Persisting data
Naive pairing
Considering user history
Optimizing for distance
E-mail follow up
Periodical tasks with node-cron
Summary
Chapter 6: Hacker News API on Koa.js
Generator syntax
Validation and error handling
Update route
Let's perform some tests
Summary

Book Details

ISBN 139781783983025
Paperback198 pages
Read More

Read More Reviews

Recommended for You

Node.js 6.x Blueprints Book Cover
Node.js 6.x Blueprints
$ 39.99
$ 28.00
RESTful Web API Design with Node.js - Second Edition Book Cover
RESTful Web API Design with Node.js - Second Edition
$ 23.99
$ 16.80
Node.js Design Patterns - Second Edition Book Cover
Node.js Design Patterns - Second Edition
$ 39.99
$ 28.00
MEAN Web Development - Second Edition Book Cover
MEAN Web Development - Second Edition
$ 35.99
$ 25.20
Node.js Web Development - Third Edition Book Cover
Node.js Web Development - Third Edition
$ 35.99
$ 25.20
ReactJS Blueprints Book Cover
ReactJS Blueprints
$ 35.99
$ 25.20