My template/demo app: Node.js + Neo4j

126 views
Skip to first unread message

Aseem Kishore

unread,
Mar 1, 2012, 3:55:17 AM3/1/12
to Neo4j Discussion
I'd really been wanting to do an actual killer app for this contest, but alas, too freaking busy to do a real app.

But I really wanted to do *something* -- both to learn Heroku (incl. the Neo4j addon) and to contribute some Node.js love -- so I whipped together a little template/demo app in the last couple of days. (I was aiming for the 12am PST deadline, but I ended up missing it by 30 mins! =P)

Just thought I'd share it here:

https://github.com/aseemk/node-neo4j-template

It's admittedly ugly as sin, but the functionality goes beyond just "here's how you connect to a Neo4j database" one-liner -- the app implements CRUD for both nodes and relationships. It's a simple social network manager, letting you add/remove users and control who follows who.

It feels like the main Neo4j audience is Java guys who use Neo4j embedded, but I come from a web background and I rely on Neo4j solely through its REST API. So I hope this app helps others like me, esp. those who consider Node.js as exciting as I do. =)

Feedback/questions/comments/etc. welcome! Thanks Neo4j team for setting up this contest -- I really enjoyed the opportunity to both learn Heroku and contribute back to the community.

Cheers,
Aseem

P.S. Also worth mentioning that this app uses the Node.js library that my startup built -- https://github.com/thingdom/node-neo4j -- instead of the official Neo4js. The original reasons we built our own library were that Neo4js didn't originally support Node.js, plus it was GPL-licensed, which is a deal-breaker for JS. I hear neither is the case anymore.

Besides that, a quick perusal of Neo4js shows it to be essentially a port of the Java API. I personally much prefer the API style we've used, e.g. using the typical  Node.js convention of callback(err, results); it feels more natural for the platform. But I haven't compared the libraries beyond this cursory level.

Peter Neubauer

unread,
Mar 1, 2012, 4:47:48 AM3/1/12
to ne...@googlegroups.com
Well,
Febrauary is not over YET! So this is totally legit! You got 13 more
minutes and have registered :)

http://www.timeanddate.com/worldclock/city.html?n=103

Also, have you looked at the promise based callbacks Thomas has been
introducing in Neo4js?
https://github.com/tbaum/heroku-node-neo4js/blob/master/myapp.coffee

I would LOVE for these two drivers to converge. Also, is there any
point in supporting Cypher with a JavaScripty DSL, since I suspect it
will very soon start to be useful even for graph mutations?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/

Reply all
Reply to author
Forward
0 new messages