koas-status-code
v0.7.0
Published
Koas status code automatically sets the response status code based on the success status code specified in the Open API object.
Downloads
12,083
Readme
Koas Spec Handler
Koas status code automatically sets the response status code based on the success status code specified in the Open API object.
Installation
npm install koa koas-core koas-status-code
Usage
const Koa = require('koa');
const { koas } = require('koas-core');
const { statusCode } = require('koas-status-code');
const api = require('./api.json');
const app = new Koa();
app.use(koas(api, [statusCode()]));