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
This uses the Go standard library http server, along with the cq library, and a mix of standard database/sql and jmoiron/sqlx functionality.
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
Go to http://localhost:8080
You can search for movies by title or and click on any entry .
This button will walk you through the deployment just with a few clicks. It will add the free plan of the GrapheneDB add-on.
Done!
# 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