Files
DefinitelyTyped/types/koa-mount/koa-mount-tests.ts
Tomek Łaziuk 9b9df23750 [koa-mount] version bump (#22873)
* version fix and dtslint

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

23 lines
345 B
TypeScript

import * as Koa from "koa";
import * as mount from "koa-mount";
const a = new Koa();
a.use((next) => {
this.body = "Hello";
});
const b = new Koa();
b.use((next) => {
this.body = "World";
});
const app = new Koa();
app.use(mount("/hello", a));
app.use(mount("/world", b));
app.listen(3000);
console.log("listening on port 3000");