darkflare
v4.4.1
Published
The API Engine
Downloads
15
Readme
darkflare
Setup
# Get the latest release.
npm i darkflare
# Get on the bleeding edge with the latest unstable release.
npm i darkflare@canary
Usage
import { useRoute, Type } from 'darkflare'
const Get = useRoute({
schema: {
body: Type.String()
}
}, async ctx => {
console.log(ctx.req.body) // string
return 'Hello World'
})
export { Get }