DZone
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
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. Neo4j on Heroku - Part 3

Neo4j on Heroku - Part 3

Max De Marzi user avatar by
Max De Marzi
·
Jan. 19, 12 · Interview
Like (0)
Save
Tweet
Share
5.49K 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

  • How To Build a Spring Boot GraalVM Image
  • 5 Steps for Getting Started in Deep Learning
  • Best CI/CD Tools for DevOps: A Review of the Top 10
  • Top 10 Best Practices for Web Application Testing

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • 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: