Files
DefinitelyTyped/types/koa-bodyparser/koa-bodyparser-tests.ts
Tomek Łaziuk 5fef2dbbe2 [koa-bodyparser] fix package version (#22871)
* fix version

* Update index.d.ts

* Update index.d.ts

* dtslint
2018-01-18 13:28:26 -08:00

14 lines
253 B
TypeScript

import * as Koa from "koa";
import * as bodyParser from "koa-bodyparser";
const app = new Koa();
app.use(bodyParser({ strict: false }));
app.use((ctx) => {
console.log(ctx.request.body);
console.log(ctx.request.rawBody);
});
app.listen(80);