2.0.1 • Published 5 years ago
@diegoh/api-middleware-content-type-json v2.0.1
@diegoh/api-middleware-content-type-json
Koa middleware that sets the content type of the response to application/json.
Usage
Example
const Koa = require('koa');
const setContentTypeJson = require('@diegoh/api-middleware-content-type-json');
const app = new Koa();
app.use(setContentTypeJson());Development
- Create a new branch from
masterwith a name relevant to the changes you're making.git branch -b my-new-feature-description - Push the branch and open a Pull Request (PR).
- Request a code review.
Unit Tests
npm run test:unit
Coverage
npm run test:coverage
Lint
npm run lint or npm run lint:fix to automatically fix any linting issues.