neo4j-examples/movies-elixir-phoenix

Name: movies-elixir-phoenix

Owner: Neo4j Examples

Description: Neo4j with Elixir, Phoenix and Neo4j.Sips(?) - The Movies Example Application

Created: 2015-10-25 23:06:28.0

Updated: 2018-01-24 15:29:34.0

Pushed: 2017-01-10 02:52:24.0

Homepage: null

Size: 252

Language: Elixir

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

The Movies Example Application

Update: 2017-01-09

Update: 2016-07-26

A very simple web application using Neo4j with Elixir, Phoenix and the Neo4j.Sips driver.

The Stack

These are the components of our Web Application:

Prerequisites
Install
$ git clone https://github.com/neo4j-examples/movies_elixir_phoenix
$ cd movies_elixir_phoenix
$ mix do deps.get, deps.compile
Configure the access to your Neo4j server

Edit the config/config.exs and describe the Neo4j server endpoint, example:

config :neo4j_sips, Neo4j,
  url: "http://localhost:7474",
  pool_size: 5,
  max_overflow: 2,
  timeout: 30

If your server requires basic authentication, add this to your config file:

basic_auth: [username: "foo", password: "bar"]

or, if using a token, you can specify it like this:

token_auth: "bmVvNGo6O12kzdA=="

Sample configuration:

config :neo4j_sips, Neo4j,
  url: "http://localhost:7474",
  basic_auth: [username: "foo", password: "bar"],
  pool_size: 5,
  max_overflow: 2,
  timeout: 30

more details and examples, here: Neo4j.Sips

Run

Start the Phoenix server:

$ cd movies_elixir_phoenix
$ mix phoenix.server

Point your browser to: http://localhost:4000, and you'll see something like this:

Oh, oh, and some endpoints, 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
Credits
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.