Home Page Icon
Home Page
Table of Contents for
Copyright and Credits
Close
Copyright and Credits
by Olayinka Omole
Server Side development with Node.js and Koa.js Quick Start Guide
Title Page
Copyright and Credits
Server Side Development with Node.js and Koa.js Quick Start Guide
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Code in action
Conventions used
Get in touch
Reviews
Introducing Koa
Technical requirements
What is Koa?
What can you do with Koa?
Why choose Koa?
When you should not use Koa
Koa versus Express
How can this book help you understand Koa better?
Summary
Getting Started with Koa
Technical requirements
Modern JavaScript
A primer on Node
What is async… await?
The promise class
Introducing async
Introducing await
Installing Koa
Using Babel
Starting a server in Koa
Summary
Koa Core Concepts
Technical requirements
The application object
Useful application methods
Settings
The context object
Context object API
Aliases
The request object
Content negotiation
The response object
Middleware
Cascading in Koa
Defining middleware
Registering middleware
Common middleware
Summary
Handling Errors in Koa
Technical requirements
Catching errors in Koa
Koa's default error handler
Emitting errors
Error event listener
Throwing HTTP errors
Writing error handlers
Summary
Building an API in Koa
Technical requirements
Project setup
Initialization
Installing dependencies
Structure
Building the application
Starting the server
Using Nodemon
Connecting to a database
Creating data models
Setting up the router
Setting up a logger
Creating contact endpoints and controller actions
Retrieving all contacts
Storing new contacts
Retrieving a single contact
Updating a contact
Deleting a contact
Validating requests
Useful notes
Summary
Building an Application in Koa
Technical requirements
About the application
Setting up a project
Installing dependencies
Project structure
Building the application
Starting the server
Connecting to the database
Creating data models
The user model
The post model
Setting up the router
Setting up the views
Using partials
Setting up sessions
Handling authentication
User registration and login
Authentication middleware
Creating controller functions
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Title Page
Next
Next Chapter
Server Side Development with Node.js and Koa.js Quick Start Guide
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset