Skip to content

hoa-js/tiny-router

Repository files navigation

@hoajs/tiny-router

Tiny router middleware for Hoa.

Installation

$ npm i @hoajs/tiny-router --save

Quick Start

import { Hoa } from 'hoa'
import { tinyRouter } from '@hoajs/tiny-router'

const app = new Hoa()
app.extend(tinyRouter())

app.get('/users/:name', async (ctx, next) => {
  ctx.res.body = `Hello, ${ctx.req.params.name}!`
})

export default app

Documentation

The documentation is available on hoa-js.com

Test (100% coverage)

$ npm test

License

MIT

About

Tiny router middleware for Hoa.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published