Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
A basic Koa.js REST API returning 'Hello World'.
const Koa = require('koa');
const app = new Koa();
app.use(ctx => {
ctx.body = { message: 'Hello World' };
});
app.listen(3000, () => {
console.log('Server running on http://localhost:3000');
});Koa.js is a modern, minimalist web framework for Node.js, created by the same team behind Express.js. It leverages async/await for clean middleware handling and provides a lightweight foundation for building APIs and web applications.
Origin & Creator
Koa.js was created by the Express.js team-TJ Holowaychuk and contributors-in 2013-2014 as a next-generation, lightweight framework for Node.js.
Industrial Note
Koa is preferred when developers want minimalism, async/await-based middleware, and full control over application structure without opinionated conventions.