Skip to content

albertoperdomo/cq-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neo4j Movies Example Application

Stack

  • Go

  • cq

  • Neo4j-Server

  • Frontend: jquery, bootstrap, d3.js

Endpoints:

Get Movie

// JSON object for single movie with cast
curl http://cq-neo4j-movies.herokuapp.com/movie/The%20Matrix

// list of JSON objects for movie search results
curl http://cq-neo4j-movies.herokuapp.com/search?q=matrix

// JSON object for whole graph viz (nodes, links - arrays)
curl http://cq-neo4j-movies.herokuapp.com/graph

Setup

This uses the Go standard library http server, along with the cq library, and a mix of standard database/sql and jmoiron/sqlx functionality.

Run locally:

Start your local Neo4j Server (Download & Install), open the Neo4j Browser. Then install the Movies data-set with :play movies, click the statement, and hit the triangular "Run" button.

Start this application with:

PORT=8080 go run server.go

You can search for movies by title or and click on any entry .

Deploy to Heroku using Heroku button

This button will walk you through the deployment just with a few clicks. It will add the free plan of the GrapheneDB add-on.

Deploy

Done!

Deploy to Heroku manually

# create a new app with the go buildpack
heroku create -b https://github.com/kr/heroku-buildpack-go.git
# add the graphenedb addon
heroku addons:add graphenedb:chalk

# create a procfile (cq-example should be replaced with whatever go build creates)
echo 'web: cq-example' > Procfile

# install godep
go get github.com/kr/godep
# save deps (do this whenever you update your 3rd party libs)
godep save

# commit
git commit -a -m 'Heroku / deps'
# push to heroku
git push heroku master

About

neo4j example app using cq

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%