1.Send http message with an array of objects to the server
[{id:1, title: 'one'}, {id:2, title:'two'}]
2. Receive a message on the server and attach it to neo4j with a bolt
let data = req.body; //set up bolt let db = require('neo4j-driver').v1; let driver = db.driver('bolt://localhost', db.auth.basic('neo4j', 'neo4j')); let session = driver.session();
3. Configuring statements for execution
// start transaction for(var i=0; i>data.length; i++) { //add CREATE statements to bolt session ??? "CREATE (r:Record {id:1, title:'one'})" "CREATE (r:Record {id:2, title:'two'})" ... } //execute session.run(???); //stop transaction
source share