,当我把我的EtherPad的代码,它表示有一个错误处理您的settings.json文件:过程没有定义
[31米[2012年11月3日15:14:00.102] [错误]控制台 - [39mThere是一个错误的过程 荷兰国际集团的settings.json文件:过程没有定义
这个关键代码如下
/*
This file must be valid JSON. But comments are allowed
Please edit settings.json, not settings.json.template
*/
{
//Ip and port which etherpad should bind at
"ip": process.env.VCAP_APP_HOST,
"port" : process.env.VCAP_APP_POR,
//The Type of the database. You can choose between dirty, postgres, sqlite and mysql
//You shouldn't use "dirty" for for anything else than testing or development
/*"dbType" : "dirty",*/
//the database specific settings
/*"dbSettings" : {
"filename" : "var/dirty.db"
},*/
/* An Example of MySQL Configuration */
"dbType" : "mysql",
"dbSettings" : {
"user" : process.env.VCAP_SERVICES["etherpadDB"][0]["credentials"]["user"],
"host" : process.env.VCAP_SERVICES["etherpadDB"][0]["host"],
"password": process.env.VCAP_SERVICES["etherpadDB"][0]["password"],
"database": process.env.VCAP_SERVICES["etherpadDB"][0]["name"]
},
}
感谢您的回答,但是我会将其推送到app-fog或云代工厂,在服务运行之前我不知道ip或prot。并且文档说我应该在Node中使用process.env.VCAP_APP_HOST。 JS服务器。但它似乎不工作。 – cyong
是的,Cloud Foundry的节点自动配置使用这些值,但不能简单地将它们插入到JSON文件中并期望它们工作。至少,您需要能够评估您拥有的文件(作为JavaScript对象),然后将其绑定到本地文件系统以供EtherPad识别。还应该注意的是,Cloud Foundry __并未将EtherPad__列为具有自动配置支持的服务,如下所示:http://blog.cloudfoundry.com/2012/08/14/cloud-foundry-now-supports-auto-reconfiguration - 用于节点-JS-应用/ –