/movies-ruby-neo4jrb

Neo4j Movies Demo App in ruby with neo4jrb

Primary LanguageHTML

This example demonstrates how to map node and relationships to Ruby classes.

How to install

bundle install

How to run

In your Neo4j web console UI you should type :play movies to load the data into your database.

Then to start up the web server:

# with rackup
NEO4J_URL=http://username:password@host:port bundle exec rackup config.ru
# with shotgun for for development / reloading
NEO4J_URL=http://username:password@host:port bundle exec shotgun config.ru

If your neo4j server is not running on localhost:7474 then you can specify an alternate location with an environment variable named NEO4J_URL.

Design

This example is very slow if used from the Neo4j Server since it does a lot of requests instead of using just one cypher query (as in the neo4j-core example). Notice that Neo4j.rb tries to hide the internal Neo4j ids. Instead in the example we have created primary keys on title and name properties.