Database Reference
In-Depth Information
Local Apache Configuration
To follow the sample application found later in this chapter, you will need to properly configure your local Apache
webserver to use the workspace project in Eclipse as the document root. One way to accomplish this is by adding a
virtual host to Apache. Listing 10-4 covers the basic configuration for adding a virtual host to the httpd-vhosts.conf file.
Listing 10-4. Minimum Configuration for httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName practicalneo4j-ruby
DocumentRoot /Users/username/somepath/practicalneo4j-ruby/app/public
<Directory /Users/username/somepath/practicalneo4j-ruby/app/public>
Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /Users/username/somepath/practicalneo4j-ruby/app/logs/error.log
LogLevel warn
</VirtualHost>
If you do not have Apache HTTP installed, go to http://httpd.apache.org/ and follow the instructions based
on your operating system. Configuring Ruby + Sinatra with a local instance of Apache HTTP is out of the scope of this topic,
but you can find the basic configuration steps at http://recipes.sinatrarb.com/p/deployment/apache_with_passenger .
Important
Neography
As with most of the language drivers and libraries available for Neo4j, the purpose of Neography is to provide a degree
of abstraction over the Neo4j REST API. In addition, the Neography API provides some additional enhancements that
might otherwise be required at some other stage in the development of your Ruby application, such as caching.
This section reviews the operations and usage of the Neography library with the goal of understanding the library
before implementing it within an application. Then the “Developing a Ruby and Neo4j Application” section will walk
you through a sample application with specific graph goals and models.
Neography is maintained by the super-awesome Max De Marzi and supported by a number of great Ruby
graphistas. If you would like to get involved with Neography, go to https://github.com/maxdemarzi/neography .
Note
Each of the following brief sections covers concepts that tie either directly or indirectly to features and
functionality found within the Neo4j Server and REST API. If you choose to go through each language chapter, then
you should notice how each library covers those features and functionality in similar ways but takes advantage of the
language-specific capabilities to ensure the API is flexible and performant.
 
 
Search WWH ::




Custom Search