MCPcopy
hub / github.com/eggjs/egg / hello

Function hello

example/helloworld-typescript/app/middleware/hello.ts:3–13  ·  view source on GitHub ↗
(ctx, next)

Source from the content-addressed store, hash-verified

1import { MiddlewareFunc } from '../../../../src/index.js';
2
3export const hello: MiddlewareFunc = async (ctx, next) => {
4 ctx.body = 'Hello World!';
5 console.log(ctx.app.type, ctx.app.server, ctx.app.ctxStorage.getStore()?.performanceStarttime);
6 console.log(ctx.performanceStarttime);
7 const res = await ctx.curl('https://eggjs.org');
8 console.log(res.status);
9
10 // egg watcher
11 // console.log('egg watcher', ctx.app.watcher);
12 await next();
13};

Callers

nothing calls this directly

Calls 1

curlMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…