@hoajs/json
v0.2.3
Published
JSON response formatting middleware for Hoa.
Readme
@hoajs/json
JSON response formatting middleware for Hoa.
Installation
$ npm i @hoajs/json --saveQuick Start
import { Hoa } from 'hoa'
import { json } from '@hoajs/json'
const app = new Hoa()
app.use(json())
app.use(async (ctx) => {
ctx.res.body = 'Hello, Hoa!'
})
export default appResponse:
{
code: 200,
data: 'Hello, Hoa!'
}Documentation
The documentation is available on hoa-js.com
Test (100% coverage)
$ npm testLicense
MIT
