Skip to content

Instantly share code, notes, and snippets.

@johnymontana
Created June 11, 2018 16:34
Show Gist options
  • Save johnymontana/a6df2a59e26fa2dddc2751ab4a2dc597 to your computer and use it in GitHub Desktop.
Save johnymontana/a6df2a59e26fa2dddc2751ab4a2dc597 to your computer and use it in GitHub Desktop.
// 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