File size: 278 Bytes
8969f81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import * as Koa from "koa";
import * as Router from "koa-router";

let id = 0;

const app = new Koa();
const router = new Router();

router.get("/*", async ctx => {
	ctx.body = id++;
});

app.use(router.routes());

app.listen(3000);

console.log("Server running on port 3000");