egg-apollo-client's Issues
覆盖配置
可以设置时间间隔不断更新配置文件(config.default.ts)里的对象字段么,如何配置
config.apollo = {
config_server_url: 'http://106.54.227.205:8080', // required, 配置中心服务地址
app_id: 'appid', // required, 需要加载的配置
init_on_start: true, // optional, 在 app 启动时同时加载配置,加载的配置会在插件加载前被加载
cluster_name: 'default', // optional, 加载配置的集群名称, default: 'default'
namespace_name: 'application', // optional, 加载配置的命名空间, default: 'application'
release_key: '', // optional, 加载配置的版本 key, default: ''
ip: '', // optional,
set_env_file: true, // optional, 是否写入到 env 文件, default: false
env_file_path: '', // optional, 写入的 env 文件路径, default: ${app.baseDir}/.env.apollo
watch: true, // optional, 长轮询查看配置是否更新, default: false
timeout: 61000, // optional, 长轮询 timeout 设置,默认 50000
};
获取apollo接口的时候会提示报错
版本:2.0.3
config.apollo = {
config_server_url: 'http://106.54.227.205:8080',
app_id: 'demo001',
init_on_start: true,
};
请求地址我看了一下是http://106.54.227.205:8080/configs/demo001/default/application
在浏览器中能直接打开,在node当中有报错
2021-05-27 18:18:24,247 WARN 35971 [egg-apollo-client] {"message":"RequestError: undefined"}
在版本1.4.0当中我也尝试过,是可以获取到配置的
启动初始化时可以同时取回多个namespace的配置吗?
如题,业务按分类配置了多个namespace,可以在应用启动时(init_on_start=true),从Apollo取回多个namespace的配置吗?
the namespace not set in config file not work
when i set namespace=application in config file,
only get configs under application namespace worked,
get configs from other namespaces not work, why?
set_env_file not work
apollo: {
config_server_url: 'server_url',
app_id: 'appId',
init_on_start: true,
cluster_name: 'default',
namespace_name: 'application',
release_key: '',
set_env_file: true,
watch: true,
timeout: 5000,
},
this is my config, built .env.apollo file under the app.baseDir yet.
set_env_file not work, what is the problem?
the namespace not set in config file not worked
when i set namespace=application in config.js file,
get the config in application namespace works,
but get config from other namespace not work, why?
Cannot read property 'content-type' of undefined
hi,请教下
我在egg 项目的中引用的版本入下
"@gaoding/egg-apollo-client": "^2.0.3",
typescript版本为"^3.0.0"
运行 yarn run dev 会报TypeError: Cannot read property 'content-type' of undefined错误,
但是如果"@gaoding/egg-apollo-client":"^1.4.0"则是可以运行
我们最新的egg-apollo-client版本在ts环境下该如何解决上面的问题吖
how to receive watch result
i config watch:true, timeout:5.
but i dont know whether they worked.
how can i receive the long polling result?
先判断是否有js的文件 在判断是否有ts的是否更好?
if (fs.existsSync(path) && process.env.NODE_ENV === 'development') {
return require(path);
}
else {
return require(path.replace(/\.ts$/, '.js'));
}
我本地开发NODE_ENV是local 这样就报错了
watch not work
startNotification->remoteConfigServiceSkipCache
if (response.isJSON() || response.statusCode === 304) {
if (response.data) {
this.setEnv(response.data);
// 这里没有触发 this.emit('config.updated', response.data);
}
return response.data;
}
delay in startNotification function not used
there is setDelay function, but where is it used by?
the long polling has no delay makes too much server load.
how can i fix this?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.