We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node环境 :8.12.0
8.12.0
自定义了一个EGG_SERVER_ENV=site
EGG_SERVER_ENV=site
npm 运行命令"testEnv": "ENABLE_NODE_LOG=YES NODE_LOG_DIR=/tmp/ EGG_SERVER_ENV=sit NODE_ENV=production egg-scripts start --daemon --title=egg-server-dubbo-egg",
npm
"testEnv": "ENABLE_NODE_LOG=YES NODE_LOG_DIR=/tmp/ EGG_SERVER_ENV=sit NODE_ENV=production egg-scripts start --daemon --title=egg-server-dubbo-egg",
也增加了一个配置文件,配置如下
'use strict'; const path = require('path'); const fs = require('fs'); module.exports = appInfo => { const config = exports = {}; // 获取路径下文件列表 function findSync(startPath) { let result=[]; function finder(path) { const files=fs.readdirSync(path); files.forEach((val,index) => { if (val.indexOf('.js')>=0) { result.push(val.replace('.js', '')) } }); } finder(startPath); return result; } const baseDir = appInfo.baseDir; let controllerArray=findSync(path.join(process.cwd(), 'app/controller')); // 获取controller文件夹下面的文件列表 const errArray = [ path.join(baseDir, 'logs/dubbo-egg/common-error.log'), path.join(baseDir, 'logs/dubbo-egg/dubbo-bff-web.log'), path.join(baseDir, 'logs/dubbo-egg/egg-agent.log'), path.join(baseDir, 'logs/dubbo-egg/egg-web.log') ] controllerArray.forEach(val=> { errArray.push(path.join(baseDir, `logs/dubbo-egg/${val}/error.log`)) }) config.alinode = { enable: true, server: 'wss://agentserver.node.aliyun.com:8080', appid: '', secret: '', error_log: errArray, packages: [ path.join(baseDir, './package.json'), ], }; return config; };
local环境alinode可以被加载到,但是sit环境下不行,感觉是配置未加载
local
alinode
sit
The text was updated successfully, but these errors were encountered:
看下 run 目录下的 application_config.json 里面,对应的 plugin 和 config 节点是否合并正确吧。
PS: egg-scripts start --env=sit --daemon --title=egg-server-dubbo-egg 即可,那些 env 没必要。
egg-scripts start --env=sit --daemon --title=egg-server-dubbo-egg
Sorry, something went wrong.
Hello @dsky1990. Please provide a reproducible example following the instruction.
Issues labeled by Need Reproduce will be closed if no activities in 7 days.
Need Reproduce
@dsky1990,请根据这个说明提供最小可复现代码。
如果在 7 天内没有进展会被自动关闭。
@atian25 刚看了一眼,现在有了- -很奇怪,感谢帮助
No branches or pull requests
node环境 :
8.12.0
自定义了一个
EGG_SERVER_ENV=site
npm
运行命令"testEnv": "ENABLE_NODE_LOG=YES NODE_LOG_DIR=/tmp/ EGG_SERVER_ENV=sit NODE_ENV=production egg-scripts start --daemon --title=egg-server-dubbo-egg",
也增加了一个配置文件,配置如下
local
环境alinode
可以被加载到,但是sit
环境下不行,感觉是配置未加载The text was updated successfully, but these errors were encountered: