Install Neo4j :
$ brew install neo4j
Start the Neo4j in your machine :
$ neo4j start
Go to console and configure your user :
Open this link : http://localhost:7474/
You will see this :
The default user and password is neo4j.
After put this informations you need change your password .
Now you have the Neo4j database running in your machine.
Create the meteor application
$ meteor create [name]
Example :
$ meteor create appneo4j
Add packages for neo4j
Inside your project you need :
$ meteor add ostrio:neo4jdriver
$ meteor add ostrio:neo4jreactivity
Configure your application to use Neo4j:
- Create the directory inside your application with name lib;
- Create the file neo4j.js inside this directory;
Your configurations :
/* Allow client query execution */ Meteor.neo4j.allowClientQuery = true; /* Custom URL to Neo4j should be here */ /* CHANGE THIS LINE IN ACCORDING TO YOUR NEO4J SETTINGS */ Meteor.neo4j.connectionURL = 'http://neo4j:password@localhost:7474'; /* But deny all writing actions on client */ Meteor.neo4j.set.deny(neo4j.rules.write);
Example :
Finish. Now start your application. You have now a meteor project running with neo4j database.
This article ends very abruptly. How do you write queries for neo4j after this? How does the subscription work? Just like regular mongoDB collections?
LikeLike
The ideia of this blog is give short solutions . I mean, you have the question and you have a directly answer which is sometimes impossible to find. We need looking for and read a lot of things to get the basics of something. This post is a POC with meteorJs and Neo4J. There you can find how to connect, how to do a select, update and delete. You have the start point for can go deeply after 🙂
LikeLike