Skip to content

An opinionated Koa toolkit for building microservices

Notifications You must be signed in to change notification settings

nolanleung/koa-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koa Toolkit

npm version npm downloads

An opinionated, batteries-included toolset for efficient Koa API development

npm install koa-toolkit

Purpose

The Koa Toolkit package is intended to provide a way to get a Koa server up and running with as few lines as possible while maintaining middleware flexibility.

This package is currently under development, so PRs are welcome and encouraged!

What's Included

Redux Toolkit includes:

  • A createServer(port, callback) function that returns a new Koa instance with routing and body parsing middleware.
  • A createRouter(options) function that returns a new koa router

Example

const { createServer } = require('koa-toolkit');

const app = createServer();

app.router.get('/', async ctx => {
  ctx.body = {
    hello: 'world',
  }
})

app.listen(3000, () => {
  console.log('> Server listening!');
});

About

An opinionated Koa toolkit for building microservices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published