Skip to content

Instantly share code, notes, and snippets.

@bugs181
bugs181 / leto-example.js
Last active June 18, 2017 11:39
Example of using Leto
const leto = require('Leto')
let leto = new Leto()
leto
.use('neo4j') // Synonymous with require(), but does some special processing.
.connect({ user, pass, host }) // Pass in a config option for .connect() but has defaults too.
.create('Person', 'name') // Creates a label constraint on the name prop
.add(myPerson) // Add the myPerson object to neo4j. No Cypher syntax needed. ;)
.catch(err => console.log(`Error occured: ${err}`)
/**
* @overview datejs
* @version 1.0.0alpha-2014-01-07
* @author Gregory Wild-Smith <gregory@wild-smith.com>
* @copyright 2014 Gregory Wild-Smith
* @license MIT
* @homepage https://github.com/abritinthebay/datejs
*/
/*
2014 Gregory Wild-Smith