Skip to content
Browse files

initial

  • Loading branch information...
0 parents commit 3ac165e7aef1c9b6037daa23a07e5ba64b3730f5 @jexp committed
Showing with 34 additions and 0 deletions.
  1. +34 −0 imdb.rb
34 imdb.rb
@@ -0,0 +1,34 @@
+# uses the neography gem, see: https://github.com/maxdemarzi/neography
+# see http://wiki.neo4j.org/content/Using_the_Neo4j_Server_with_Ruby
+
+require 'rubygems'
+require "neography"
+require "sinatra"
+
+set :haml, :format => :html5
+
+before '/*' do
+ @neo = Neography::Rest.new({
+ :server => ENV['NEO4J_HOST'],
+ :directory => "/#{ENV['NEO4J_INSTANCE']}",
+ :authentication => 'basic',
+ :username => ENV['NEO4J_LOGIN'] ,
+ :password => ENV['NEO4J_PASSWORD']
+ })
+
+# @neo = Neography::Rest.new
+end
+
+
+get '/' do
+ '<h2>Neo4j Imdb</h2>' + @neo.get_root.inspect
+end
+
+get '/actors' do
+ '<h2>Movies</h2>'
+end
+
+
+get '/movies' do
+ '<h2>Actors</h2>'
+end

0 comments on commit 3ac165e

Please sign in to comment.
Something went wrong with that request. Please try again.