mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-08 08:04:19 +08:00
13 lines
223 B
TypeScript
13 lines
223 B
TypeScript
import Koa = require("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) |