Book Image

Server Side development with Node.js and Koa.js Quick Start Guide

By : Olayinka Omole
Book Image

Server Side development with Node.js and Koa.js Quick Start Guide

By: Olayinka Omole

Overview of this book

Every developer wants to build modular and scalable web applications. Modern versions of JavaScript have made this possible in Node.js, and Koa is a Node.js framework that makes it easy. This book is the ideal introduction for JavaScript developers who want to create scalable server side applications using Node.js and Koa.js. The book shows you how Koa can be used to start projects from scratch, register custom and existing middleware, read requests, and send responses to users. We will explore the core concepts in Koa, such as error handling, logging, and request and response handling. We will dive into new concepts in JavaScript development, and see how paradigms such as async/await help with modern Node.js application development. By the end of this book, you will be building robust web applications in Koa using modern development paradigms and techniques of Node.js development.
Table of Contents (8 chapters)

What this book covers

Chapter 1, Introduction to Koa, introduces Koa and talks about its benefits for server-side web development. We will talk about the reasons why developers may choose to use Koa for software development. We will also introduce the remainder of the book and talk about how the book will help its readers to navigate the complex waters of Koa.

Chapter 2, Getting Started with Koa, explains how to get started with server-side development with Koa. We will learn how to install Koa, create a simple server, and build the obligatory Hello World app.

Chapter 3, Koa Core Concepts, discusses the application, context, and request and response objects in Koa. We will also learn about how to create and use middleware. We will go into detail about Koa's philosophy and show readers how the different parts of the framework work.

Chapter 4, Handling Errors in Koa, goes into error handling in Koa. We will look at the different methods of handling errors in Koa. The aim will be to make sure users have a solid foundation and know how to build Koa applications that don't break at slight exceptions.

Chapter 5, Building an API in Koa, dives into building a real-life application in Koa. We will show readers how to create routes, handle requests, and send responses from their APIs.

Chapter 6, Building an Application in Koa, reinforces what we will have learned by building a fully fledged web application in Koa. We will learn how to build a real-life application with authentication and structure it properly in Koa. We will also share some information on further reading to improve on the reader's knowledge of Koa.