DZone
Cloud Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Cloud Zone > Neo4j on Heroku - Part 3

Neo4j on Heroku - Part 3

Max De Marzi user avatar by
Max De Marzi
·
Jan. 19, 12 · Cloud Zone · Interview
Like (0)
Save
Tweet
5.33K Views

Join the DZone community and get the full member experience.

Join For Free

this is the third and final installment of the neo4j on heroku tutorial.  after reading this, you should be ready to go out there and start hacking on neo4j and then deploying your apps to heroku.




this week we learned that leaving the create_graph method accessible to the world was a bad idea. so let’s go ahead and delete that route in sinatra, and instead create a rake task for it.

in rakefile:

require 'neography/tasks'
require './neoflix.rb'

namespace :neo4j do
  task :create do
    neo = neography::rest.new(env['neo4j_url'] || "http://localhost:7474")
    create_graph(neo)
  end
end

that’s much better. we can create our graph locally with

rake neo4j:create

or we can run it on heroku with

heroku run rake neo4j:create
log in to heroku, the go to your apps https://api.heroku.com/myapps , click on your application (i’ll click on neoflix) then on the “addons” drop down menu on the right, select neo4j, and you’ll see this screen come up:

you can zip up the contents of your neo4j database to neoflix.zip and perform a restore operation.

cd neo4j/data/graph.db
zip -r neoflix.zip .

your neo4j addon will restart and all your data will be loaded and ready to go.

if you have followed part 1 and part 2 of this series, then you should take what you have learned and create a neo4j demo application. take part in the neo4j challenge and have a chance at winning awesome prices as well as learning a new technology.



source: http://maxdemarzi.com/2012/01/18/neo4j-on-heroku-part-three/
Neo4j

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Emerging Technologies Make Data Centers More Energy Efficient?
  • 4 Careers for People with Coding Backgrounds
  • Testing Your Infrastructure as Code Using Terratest
  • SQL CTE: How to Master It in One Sitting With Easy Examples

Comments

Cloud Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo