1

I need to connect a node.js project using NEODE library (https://github.com/adam-cowley/neode) to a graphenedb hosted by heroku.

on neode docs they use 2 approaches based on:
1. direct access using
2. env file contains props

Anyone has facing this issue?

1. new Neode('bolt://localhost:7687', 'username', 'password', true);

2. // .env
NEO4J_PROTOCOL=bolt
NEO4J_HOST=localhost
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=neo4j
NEO4J_PORT=7687

1 Answers1

1

On Heroku, go to Settings and Reveal Config Vars.

NEO4J_PROTOCOL is bolt.

NEO4J_HOST is Heroku's GRAPHENE_BOLT_URL minus the protocol prefix and port suffix, so something like hobby-sdajflkdjaiodsfajll.dbs.graphenedb.com

NEO4J_USERNAME and NEO4J_PASSWORD are GRAPHENEDB_BOLT_USER and GRAPHENEDB_BOLT_PASSWORD (or whatever username/password you set up on GrapheneDB).

NEO4J_PORT is the port from GRAPHENEDB_BOLT_URL (24787 default). It is NOT the port from GRAPHENEDB_URL.

In your .env file, add NEO4J_ENCRYPTION=ENCRYPTION_ON.

As of this writing, there's a known issue with Neode not working with Neo4j versions under 4.0 (GrapheneDB runs 3.5) due to multiple database support. If you still want to use Neode, downgrade to v 0.3.7

Sliss
  • 33
  • 1
  • 1
  • 6