egg
egg copied to clipboard
🥚 Born to build better enterprise frameworks and apps with Node.js & Koa
##### Checklist - [x] `npm test` passes - [x] tests and/or benchmarks are included - [x] documentation is changed or added - [x] commit message follows commit guidelines ##### Description...
## What happens? egg-redis使用clients后,使用get('instanceName").set("test", "111"),ts报错:Property 'set' does not exist on type 'Promise '. ## Mini Showcase Repository(REQUIRED) [dom地址](https://github.com/Shen120/egg-redis-clients-bug) ## How To Reproduce **Steps to reproduce the behavior:** 1. 打开代码 2....
[文档](https://www.eggjs.org/zh-CN/core/logger#app-logger)中有这一段描述: > 如何打印日志 Context Logger 如果我们在处理请求时需要打印日志,这时候使用 Context Logger,用于记录 Web 行为相关的日志。 每行日志会自动记录上当前请求的一些基本信息, 如 [$userId/$ip/$traceId/${cost}ms $method $url]。 其中并没有描述$userId、$traceId的值从哪里来,我找了[egg-logger](https://github.com/eggjs/egg-logger)的README也没有这一块的描述,最后在#3822 才间接找到traceId需要安装另一个插件egg-tracer,然后$userId的值也是找了egg-logger的源码才知道要给ctx赋一个userId值。因此希望可以在文档里加入对这两个参数的描述~ 或者需要的话,我来提个PR编写一下相关文档?
egg-redis/index.d.ts ---------------------- ``` import { Redis, RedisOptions } from "ioredis"; interface ClusterOptions extends RedisOptions { cluster?: boolean; nodes?: RedisOptions[]; } interface EggRedisOptions { Redis?: Redis; default?: object; app?: boolean; agent?:...
config.security配置里配置了cookie名称为csrfToken,前端ajax请求带入了cookie为csrfToken的值,这种情况egg-security里面这行代码 if (token !== this[CSRF_SECRET] && !tokens.verify(this[CSRF_SECRET], token)) { 判断一直为false,结果就是一直通过,前端随便改cookie名为csrfToken的值也是一直通过验证,那这个验证还有啥作用,这里没有理解,请帮忙解释下。 - [x] egg配置文件 > config.security = { > domainWhiteList: ['.xxx.com'], > csrf: { > enable: true, > // 默认为 false,当设置为...
## Background 企业内部通常我们会基于 egg 封装自己的上层框架,如 yadan。 那么我想部署 Easy-Monitor https://github.com/X-Profiler/xtransit-manager/blob/master/package.json#L12 发现它是基于 egg 开发的,如何让它变成基于 yadan 呢?除了修改代码,还能有什么方式? ## Proposal 需要一个标准的方式,让更多基于 egg 的 SaaS 可以成为企业内部应用。 ## Additional context 修改代码和不修改代码都可以接受
## What happens? 一个神奇的 API 在服务启动后调用第一次时正常,等一下再调用 API 就都是超时了,奇怪的是我用 insomnia 随便怎么请求都不会报超时的。封装的其他 API 不会这样,分析测试了好久都没搞明白,所以不清楚是哪个环节出了问题,希望能够解答,谢谢。  ## 最小可复现仓库 https://github.com/theprimone/egg-demo ## 复现步骤,错误日志以及相关配置 1. 浏览器访问 `http://127.0.0.1:7002/test?gid=1` 2. 稍等片刻再次访问则响应超时  ## 相关环境信息 - **操作系统**:WSL - **Node...
## Background Using egg-sequelize, We want to split model into multiple modules,not just gather in one directory. So can baseDir support to config directory array? ## Proposal Egg-sequelize baseDir support...
##本地连接服务器上的数据库可以正常启动项目访问 > [email protected] debug E:\房e安\node\origin-cms > egg-bin debug Debugger attached. Debugger attached. Debugger attached. Waiting for the debugger to disconnect... [egg-ts-helper] create typings\app\controller\index.d.ts (10ms) [egg-ts-helper] create typings\app\model\index.d.ts (14ms) [egg-ts-helper] create...