Server Side Development with Node. js and Koa. js Quick Start Guide : Build Robust and Scalable Web Applications with Modern JavaScript Techniques.
Every developer wants to build modular and scalable web applications. Modern versions of the JavaScript language 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 serverside...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing Ltd,
2018.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Title Page; Copyright and Credits; About Packt; Contributors; Table of Contents; Preface; Chapter 1: 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; Chapter 2: 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; Chapter 3: Koa Core Concepts
- Technical requirementsThe 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; Chapter 4: 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; Chapter 5: Building an API in Koa; Technical requirements; Project setup; Initialization
- Installing dependenciesStructure; 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; Chapter 6: Building an Application in Koa; Technical requirements; About the application; Setting up a project; Installing dependencies; Project structure; Building the application
- Starting the serverConnecting 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; Index