koajs/koa

Expressive middleware for node.js using ES2017 async functions

View on GitHub ↗Jump to charts ↓

koajs/koa has 35k+ stars and 3k+ forks on GitHub, is written in JavaScript, and was last pushed on Oct 9, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 48 minutes ago
Type:FrameworkCategory(s):Backend FrameworksWeb Development
Added to GitGenius on November 10th, 2024
Created on July 20th, 2013
Open Issues & Pull Requests: 45 (+0)
GitHub issues: Enabled
Number of forks: 3,235
Total Stargazers: 35,679 (+0)
Total Subscribers: 795 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 272.3 days
Mean response time: 812.7 days
90th percentile: 2625.6 days
Tracked items: 69

Maintainer activity

2 people did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 18, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits. How this is counted.

How this project is maintained

70% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "bug" is answered fastest, typically in about 8 days, while "enhancement" waits about 9 months. Three people close 82% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 20
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 900 days
Stale 30+ days: 20
Stale 90+ days: 18

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (134)
  • help wanted (45)
  • enhancement (44)
  • bug (35)
  • documentation (33)
  • invalid (15)
  • PR Welcomed (9)
  • wontfix (9)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Koa is an expressive HTTP middleware framework for Node.js designed to make building web applications and APIs more enjoyable by leveraging ES2017 async functions. The framework requires Node v18.0.0 or higher to support ES2015 and async function syntax. At its core, Koa maintains a minimalistic codebase of approximately 570 lines of source code, integrating only methods that are common to nearly all HTTP servers, including content negotiation, normalization of Node inconsistencies, and redirection handling. Notably, Koa is not bundled with any middleware, allowing developers to compose their applications with only the dependencies they need.

The framework's architecture centers on a middleware stack that flows in a stack-like manner, enabling developers to perform actions downstream and then filter and manipulate responses upstream. Koa supports two different kinds of middleware functions: async functions and common functions. This flexibility allows developers to choose the approach that best fits their use case, though the older v1.x middleware signature has been deprecated and removed in v3.

At the heart of Koa's design is the Context object, which encapsulates an incoming HTTP message and its corresponding response. Each middleware receives this Context object, typically referenced as ctx, which provides access to Request and Response objects. Koa's Request object delegates to Node's IncomingMessage and provides helpful methods for working with HTTP requests, while the Response object delegates to ServerResponse and provides utilities for crafting responses. This pattern of delegation rather than extension provides a cleaner interface, reduces conflicts between middleware, and offers better support for stream handling. The Context object also provides convenient shortcuts for common methods, allowing developers to use ctx.type instead of ctx.response.type.

The Koa application object, created by instantiating new Koa(), serves as the framework's interface with Node's HTTP server. It handles middleware registration, dispatching to middleware from HTTP requests, default error handling, and configuration of context, request, and response objects. The framework includes comprehensive documentation covering usage guides, error handling, migration guides between versions, API references, and troubleshooting resources.

Koa maintains an active community with resources including a Slack group, official modules badgeboard, examples repository, middleware wiki, Reddit community, and mailing list.