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