MK (fengmk2)

Results 691 comments of MK (fengmk2)

poc ![image](https://user-images.githubusercontent.com/156269/212114075-65aadaae-a2da-4668-b839-1b5dbb5b95fe.png) .vscode/settings.json ```json { "json.schemas": [ { "fileMatch": [ "config/config.json" ], "schema": { "type": "object", "properties": { "logger": { "type": "object", "properties": { "level": { "type": "string", "description": "default...

@sm2017 hello, you can set a `t` alias function to `__` like [gettext](https://github.com/eggjs/egg-i18n/blob/master/app.js#L134) does. ```js app.context.t = app.context.__; ```

@sm2017 egg will set `__` function to [ctx.locals](https://github.com/eggjs/egg-i18n/blob/master/app/middleware/i18n.js#L10) then merge all locals on [view plugin](https://github.com/eggjs/egg-view/blob/master/lib/context_view.js#L109) before [pass to nunjucks engine](https://github.com/eggjs/egg-view/blob/master/lib/context_view.js#L70).

@hax Cool! Please send us a pull request, we love to merge it!

> @fengmk2 have any plan to support this feature? @hax has given the implementation code and you are welcome to submit a pull request.

请升级 cnpm 到最新版本

require node >= 14.18.0 https://github.com/cnpm/npminstall/blob/master/package.json

you should use the latest v14 version maybe use the v18 is better, Node.js has no more maintainer `Node.js < 18`

https://nodejs.org/dist/latest-v20.x/docs/api/diagnostics_channel.html#http 使用 http.client.request.start 和 http.client.response.finish 统计

https://undici.nodejs.org/#/docs/api/DiagnosticsChannel