Database Reference
In-Depth Information
Sinatra Application Configuration
Before diving into the code examples, you need to update the configuration for the Sinatra application. In Eclipse (or
the IDE you are using), open the file {PROJECTROOT}/app/graphstory.rb and edit the GraphStory connection string
information. If you are using a free account from graphstory.com, you will change the username, password, and URL
in Listing 10-14 with the one provided in your graph console on graphstory.com .
Listing 10-14. Database Connection Settings for a Remote Service such as Graph Story
neo = Neography::Rest.new("https://username:password@theURL:7473/db/data/")
If you have installed a local Neo4j server instance, you can modify the configuration to use the local address and
port that you specified during the installation, as shown in Listing 10-15.
Listing 10-15. Database Connection Settings for Local Environment
neo = Neography::Rest.new("http://localhost:7474/db/data")
Once the environment is properly configured and started, you can open a browser to graphstory.com/practicalneo4j ,
and you should see a page like the one shown in Figure 10-6 .
Figure 10-6. The Ruby sample application home page
 
Search WWH ::




Custom Search