简体   繁体   English

cloudfoundry 中的 Neo4j。

[英]Neo4j in cloudfoundry.

I am pushing neo4j 2.3.3 application to cloudfoundry.我正在将 neo4j 2.3.3 应用程序推送到 cloudfoundry。 I have neo4j server and neo4j running cloud, which also runs in my local.我有neo4j 服务器和neo4j 运行云,它也在我的本地运行。 As of the data set is inside the neo4j server.由于数据集在neo4j服务器内。 Neo4j browser is node js application, which start on command "grunt server" but the browser starts up at http://localhost:9000 . Neo4j 浏览器是 node js 应用程序,它从命令“grunt server”启动,但浏览器从http://localhost:9000 启动 How to make the nodejs application (neo4j browser) listen to 9000. I know there process_env.如何让 nodejs 应用程序(neo4j 浏览器)监听 9000。我知道那里有 process_env。 But how to implement it here.但是如何在这里实现它。 Neo4j browser has a js file(connect.js) which loads the http protocol , host and port. Neo4j 浏览器有一个加载 http 协议、主机和端口的 js 文件(connect.js)。 I need some guidance, in making modifications here.我需要一些指导,在这里进行修改。 I have previously read VCAP_SERVICES into a java code.我以前曾将 VCAP_SERVICES 读入 java 代码。 1. how to add port 9000 to cloud foundry. 1.如何将9000端口添加到cloud Foundry。 2. how to read port env variable from cloud foundry to jd file. 2.如何从云代工厂读取端口环境变量到jd文件。 or Is there any other way around.或者有没有其他办法。 ? ?

This is a node js application.这是一个节点js应用程序。 In local : the host name is 127.0.0.1 port is 9000. server is running Neo4j browser is a node js application started using "grunt server" There are no error in the log.在本地:主机名是 127.0.0.1 端口是 9000。服务器正在运行 Neo4j 浏览器是使用“grunt 服务器”启动的节点 js 应用程序 日志中没有错误。 But I how launch the browser.但我如何启动浏览器。 I get 502 bad gateway error.我收到 502 错误网关错误。 Local host :127.0.0.1 then what is the host address for cloud foundry.本地主机:127.0.0.1 那么云代工厂的主机地址是什么。 I did try 0.0.0.0我确实尝试过 0.0.0.0

https://docs.cloudfoundry.org/buildpacks/node/node-tips.htmlhttps://docs.cloudfoundry.org/buildpacks/node/node-tips.html

-------------- 
var vcapport = process.env.VCAP_APP_PORT || 3000; 
                  var vcaphost = process.env.VCAP_APP_HOST || '0.0.0.0'; 
          server 
            .listen(vcapport, vcaphost) 
            .on('listening', function() { 
              var address = server.address(); 
              //var hostname = options.hostname || '0.0.0.0'; 
                          var hostname = vcaphost; 
              var targetHostname = 'browser.cfappstpanpz2.ebiz.verizon.com'; 

              var target = options.protocol + "://" + vcaphost +":" + vcapport; 
                          //var target = 'http://browser.cfapps.io/';

              grunt.log.writeln('Started connect web server on ' + target); 
              grunt.config.set('connect.' + taskTarget + '.options.hostname', hostname); 

              grunt.config.set('connect.' + taskTarget + '.options.port', address.port); 
                  grunt.log.writeln('server.address ' + address); 
                          grunt.log.writeln('address.port ' + address.port); 
                          grunt.log.writeln('hostname ' + hostname); 
                          grunt.log.writeln('vcapport ' + vcapport); 
                          grunt.log.writeln('vcaphost ' + vcaphos); 

              grunt.event.emit('connect.' + taskTarget + '.listening', hostname, address.port); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM