Name: bolt_movies_elixir_phoenix
Owner: Neo4j Examples
Description: A very simple web application using Neo4j with Elixir, Phoenix, and: Bolt.Sips; an Elixir driver for Neo4j?s Bolt newest network protocol.
Forked from: florinpatrascu/bolt_movies_elixir_phoenix
Created: 2016-10-02 22:22:05.0
Updated: 2018-04-10 16:50:48.0
Pushed: 2016-09-09 22:23:04.0
Homepage: null
Size: 366
Language: Elixir
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A very simple web application using Neo4j with Elixir, Phoenix, and: Bolt.Sips; an Elixir driver for Neo4j's Bolt network protocol.
These are the components of our Web Application:
localhost
, with the Bolt protocol enabled on port: 7687
:play movies
, click and hit the “Run” button.$ git clone https://github.com/florinpatrascu/bolt_movies_elixir_phoenix
$ cd bolt_movies_elixir_phoenix
$ mix do deps.get, deps.compile
Edit the config/config.exs
and describe the Neo4j server endpoint, example:
ig :bolt_sips, Bolt,
stname: 'localhost',
rt: 7687,
ol_size: 10,
x_overflow: 5
If your server requires basic authentication, add this to your config file:
basic_auth: [username: “neo4j”, password: “*“],
more details and examples, here: Bolt.Sips
Start the Phoenix server:
$ cd bolt_movies_elixir_phoenix
$ mix phoenix.server
Point your browser to: http://localhost:4000
, and you'll see the following “welcome” screen:
Click on the movie names, to see the cast and the roles for each member of the crew. Or just search movies by typing in a partial name, i.e. atlas
, apollo
, and so on.
Oh, oh, and some HTTP REST endpoints too, of course :)
# JSON object for single movie with cast
$ curl -H "Accept:application/json" \
http://localhost:4000/movies/findByTitle?title=The%20Matrix
# list of JSON objects for movie search results
$ curl -H "Accept:application/json" \
http://localhost:4000/movies/findByTitleContaining?title=matrix
# JSON object for the whole graph viz (nodes, links - arrays)
$ curl -H "Accept:application/json" \
http://localhost:4000/movies/graph?limit=100
MIT