Koa.js - Overview
A web application framework provides you with a simple API to build websites, web apps, and backends. You need not worry about low level protocols, processes, etc.
What is Koa?
Koa provides a minimal interface to build applications. It is a very small framework (600 LoC) which provides the required tools to build apps and is quite flexible. There are numerous modules available on npm for Koa, which can be directly plugged into it. Koa can be thought of as the core of express.js without all the bells and whistles.
Koa has a small footprint (600 LoC) and is a very thin layer of abstraction over the node to create server side apps. It is completely pluggable and has a huge community. This also allows us to easily extend Koa and use it according to our needs. It is built using the bleeding edge technology (ES6) which gives it an edge over older frameworks such as express.
Pug (earlier known as Jade) is a terse language for writing HTML templates.
- Produces HTML
- Supports dynamic code
- Supports reusability (DRY)
It is one of the most popular templating language used with Koa.
MongoDB and Mongoose
MongoDB is an open-source, document database designed for ease of development and scaling. We'll use this database to store data.
Mongoose is a client API for node.js which makes it easy to access our database from our Koa application.