Created
June 11, 2018 16:34
-
-
Save johnymontana/a6df2a59e26fa2dddc2751ab4a2dc597 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import the web brower version of neo4j-javascript-driver | |
import neo4j from "neo4j-driver/lib/browser/neo4j-web"; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = ... // set default state | |
// instantiate Neo4j driver instance | |
this.driver = neo4j.driver( | |
process.env.REACT_APP_NEO4J_URI, | |
neo4j.auth.basic( | |
process.env.REACT_APP_NEO4J_USER, | |
process.env.REACT_APP_NEO4J_PASSWORD | |
), | |
{ encrypted: true } | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment