Permalink
Browse files

combine host and port into addr

  • Loading branch information...
kengz committed Mar 22, 2016
1 parent 9b84b67 commit 8762390ac81974afc6bb44a2dd3c44b44aaaa09a
Showing with 6 additions and 8 deletions.
  1. +1 −2 .env-example
  2. +1 −1 lib/neo4jKB.js
  3. +3 −4 lib/query.js
  4. +1 −1 package.json
View
@@ -1,3 +1,2 @@
NEO4J_AUTH=<username>:<password>
NEO4J_HOST=localhost
NEO4J_PORT=7474
NEO4J_ADDR=localhost:7474
View
@@ -7,7 +7,7 @@ var parse = require('./parse')
/**
* This is the exported wrapper function: init the necessary params, then return the KB methods. The fields are set to neo4j defaults if not supplied.
* @private
* @param {JSON} options An optional JSON with the fields {NEO4J_AUTH='neo4j:neo4j', NEO4J_HOST='localhost', NEO4J_PORT-'7474'} containing username:password, the host address, and port number for neo4j
* @param {JSON} options An optional JSON with the fields {NEO4J_AUTH: 'neo4j:neo4j', NEO4J_ADDR: 'localhost:7474'} containing username:password, the host address, and port number for neo4j
* @return {Function} The KB functions.
*/
/* istanbul ignore next */
View
@@ -199,15 +199,14 @@ var query = _.flow(genStatArr, postQuery)
/**
* This is the exported wrapper function: init the necessary params, then return the query. The fields are set to neo4j defaults if not supplied.
* @private
* @param {JSON} options An optional JSON with the fields {NEO4J_AUTH='neo4j:neo4j', NEO4J_HOST='localhost', NEO4J_PORT-'7474'} containing username:password, the host address, and port number for neo4j
* @param {JSON} options An optional JSON with the fields {NEO4J_AUTH='neo4j:neo4j', NEO4J_ADDR='localhost:7474'} containing username:password, the host address, and port number for neo4j
* @return {Function} The query function.
*/
var queryWrap = function(options) {
options = options || {}
this.NEO4J_AUTH = options.NEO4J_AUTH || 'neo4j:neo4j'
this.NEO4J_HOST = options.NEO4J_HOST || 'localhost'
this.NEO4J_PORT = options.NEO4J_PORT || '7474'
this.NEO4J_BASEURL = 'http://' + this.NEO4J_AUTH + '@' + this.NEO4J_HOST + ':' + this.NEO4J_PORT + '/'
this.NEO4J_ADDR = options.NEO4J_ADDR || 'localhost:7474'
this.NEO4J_BASEURL = 'http://' + this.NEO4J_AUTH + '@' + this.NEO4J_ADDR + '/'
this.NEO4J_ENDPT = 'db/data/transaction/commit'
return query;
View
@@ -1,6 +1,6 @@
{
"name": "neo4jkb",
"version": "0.1.34",
"version": "0.1.35",
"description": "A graph knowledge base implemented in neo4j.",
"main": "index.js",
"scripts": {

0 comments on commit 8762390

Please sign in to comment.