mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 10:35:22 +08:00
14 lines
252 B
TypeScript
14 lines
252 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);
|