philippkueng / node-neo4j

Neo4j REST API wrapper for Node.js
MIT License
211 stars 44 forks source link

No example for: insertNode Now supports labels. #68

Open flashsnake-so opened 8 years ago

flashsnake-so commented 8 years ago

Can you please update the README with example on how to use this?

Thanks.

az-ericso commented 8 years ago

Please close this ticket.

robtg4 commented 8 years ago

there still is No example for: insertNode, using labels

hthetiot commented 6 years ago

+1

hthetiot commented 6 years ago

This works for me second argument if not callback is array of labels

db.insertNode({
    name: 'Darth Vader',
    sex: 'male'
}, ['Character'], function(err, node){
    if(err) {
        throw err;
    } else {

        // Output node properties.
        console.log(node.data);

        // Output node id.
        console.log(node._id);
    }
});