mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 03:46:07 +08:00
13 lines
222 B
TypeScript
13 lines
222 B
TypeScript
import * as Koa from "koa";
|
|
import compress = require("koa-compress");
|
|
|
|
const app = new Koa();
|
|
|
|
app.use(compress({
|
|
filter: (ctype) => {
|
|
return /text/i.test(ctype)
|
|
},
|
|
threshold: 2048
|
|
}));
|
|
|
|
app.listen(80) |