@hoajs/tiny-router
v0.1.1
Published
Tiny router middleware for Hoa.
Readme
@hoajs/tiny-router
Tiny router middleware for Hoa.
Installation
$ npm i @hoajs/tiny-router --saveQuick 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 appDocumentation
The documentation is available on hoa-js.com
Test (100% coverage)
$ npm testLicense
MIT
