File size: 314 Bytes
dc5db88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Koa from "koa";

const app = new Koa();

app.use((ctx) => {
    console.log(ctx.request.url, ctx.request.method);
	ctx.body = {
    fullUrl: ctx.request.url,
    query: ctx.request.query,
    headers: Object.fromEntries(Object.entries(ctx.request.headers)),
    env: process.env
  };
});

app.listen(7860);