2017-06-21 50 views

回答

0

取决于您的默认服务。如果您正在讨论服务端点,那么在实例化DiscoveryV1类时,在文件app.js中添加您正在使用的端点的url说明符。

const discovery = new DiscoveryV1({ 
    // If unspecified here, the DISCOVERY_USERNAME and 
    // DISCOVERY_PASSWORD env properties will be checked 
    // After that, the SDK will fall back to the bluemix-provided VCAP_SERVICES environment property 
    // username: '<username>', 
    // password: '<password>', 
    version_date: '2016-11-09', 
    url: '<endpoint>', 
    qs: { aggregation: `[${queryBuilder.aggregations.join(',')}]` } 
}); 
+0

嗨, 感谢您的回复。 我已更新我的帖子。 '我的意思是'默认服务',它是指示例代码中提到的发现服务,而不是指我们的'必需发现服务'。我提到的网址,但仍然无法正常工作。 – Aravinth

+0

查看.env文件:cf ssh APPNAME -c“cat .env” – jacques

+0

in .env文件我只有发现用户名,密码,环境ID和集合ID – Aravinth