egg
egg copied to clipboard
🥚 Born to build better enterprise frameworks and apps with Node.js & Koa
## What happens? 我使用egg-redis进行多个client连接,希望连接不同的redis库获取sessionId,但是只有第一个client能正常通过keys获取所有符合条件的key,第二个client.keys返回空数组,我通过medis看到client中确实有符合条件的key。 ## 配置如下: ``` config.redis = { clients: { m: { host: 'xxx.local', port: 6379, password: 'xxxxx', db: 2 }, o: { host: 'xxx.local', port: 6379, password:...
k8s中部署,使用滚动发布时增加了egg-healthy健康探针,新pod还没ready前,流量不会到新pod上。 但如何做到让上个版本的服务优雅退出呢? 是设置环境变量EGG_MASTER_CLOSE_TIMEOUT吗?
## What happens? I need to change the directory structure to module driven approach. ## Mini Showcase **My Structure** **My Config** **My router.js** ``` const { controller } = app.blog;...
## Background A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] https://github.com/sequelize/sequelize/releases ## Proposal Describe the solution you'd like, better to provide some...
- **操作系统**: win10 - **Node 版本**: 12.13.1 - **Egg 版本**: ^2.15.1 ```js this.ctx.cookies.set('tbtu', '123', { encrypt: true }); ``` ``` [DEP0106] DeprecationWarning: crypto.createCipher is deprecated. ``` 虽然不影响使用,但还是建议更新一下加密库
Other web application will set ctoken to `httpOnly` invalid. We need to auto fix that invalid ctoken in the browser. --- invalid csrf token 的问题我今天帮助一个用户远程的时候找到根本原因了。有一些系统错误地将 ctoken 设置为 httpOnly 了。
docker本身已经带了进程管理,多实例的扩缩容也可以通过k8s的调度器来实现 感觉在云原生环境下master和agent有点多余 是否可以使用node原生方式直接启动eggjs的work单进程,而不启动master和agent进程?
## What happens? 因为应用要run在容器之中,所以希望用单进程模型运行。 启动single mode,但是没有端口可以访问服务。 ```js const egg = require('egg'); egg.start(); ``` ## Mini Showcase Repository(REQUIRED) https://github.com/wanqiuz/single-mode-egg ## Context - **Node Version**: 10.16.0 - **Egg Version**: 2.25.0 - **Plugin...
## What happens? ``` git clone https://github.com/eggjs/egg-ant-design-pro cd egg-ant-design-pro npm run dev ``` 退出登录,再登录时,输入 admin:888888,点击登录没反应。查看 network 得到 status 是 `error`:  查看代码:`app/web/mock/user.js`,打印一下获取的 body 全是 undefined:  查看浏览器中的请求详情,body 是有值的:  ##...