-
-
Save Pompeu/e82258c950b0a0a92f3a to your computer and use it in GitHub Desktop.
NeoJ
This file contains 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
var neo4j = require('neo4j'); | |
var db = new neo4j.GraphDatabase('http://localhost:7474'); | |
var node = db.createNode({hello: 'world'}); // instantaneous, but... | |
node.save(function (err, node) { // ...this is what actually persists. | |
if (err) { | |
console.error('Error saving new node to database:', err); | |
} else { | |
console.log('Node saved to database with id:', node.id); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment