Neo4j Movies Example Application / Perl Edition Stack REST::Neo4p – Neo4j Perl driver package Mojolicious – Light but powerful Perl web framework Neo4j-Server Frontend: jquery, bootstrap, d3.js Endpoints: Get Movie // JSON object for single movie with cast curl http://localhost:8080/movie/The%20Matrix… Read more →

Neo4j Movies Example Application / Perl Edition

Stack

  • REST::Neo4p – Neo4j Perl driver package
  • Mojolicious – Light but powerful Perl web framework
  • Neo4j-Server
  • Frontend: jquery, bootstrap, d3.js

Endpoints:

Get Movie

// JSON object for single movie with cast

curl http://localhost:8080/movie/The%20Matrix



// list of JSON objects for movie search results

curl http://localhost:8080/search?q=matrix



// JSON object for whole graph viz (nodes, links - arrays)

curl http://localhost:8080/graph

Setup

From the source directory, run

perl Build.PL

which will create the ./Build script, and indicate any missing modules. You can install these with

./Build --installdeps

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.

Run tests in the source directory, if desired, with

./Build test

If all is well, start the app with Hypnotoad (included in the Mojolicious distribution):

hypnotoad script/movie_neo4p

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