Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

Latest commit

 

History

History
28 lines (17 loc) · 1.08 KB

README.adoc

File metadata and controls

28 lines (17 loc) · 1.08 KB

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 http://localhost:7474 then you can specify an alternate location with an environment variable named NEO4J_URL. You can use either http or bolt like so:

NEO4J_URL=http://neo4j:password@localhost:7474
NEO4J_URL=bolt://neo4j:password@localhost:7687

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.