Skip to content

neo4j-examples/movies-java-bolt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neo4j Movies Application: Quick Start

CI
movie application

This example application demonstrates how easy it is to get started with Neo4j in Java.

It is a very simple web application that uses our Movie graph dataset to provide a search with listing, a detail view and a graph visualization.

The Stack

These are the components of our Web Application:

  • Application Type: Java-Web Application

  • Web framework: Spark-Java (Micro-Webframework)

  • Neo4j Database Connector: Neo4j-Java-Driver for Cypher Docs

  • Database: Neo4j-Server (5.x) with multi-database

  • Frontend: jquery, bootstrap, d3.js

Provision a database quickly with Neo4j Sandbox or Neo4j Aura.

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

Make sure to install a JDK 17+ and Apache Maven.

Run locally

Just run:

mvn compile exec:java

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

Or better you can run Neo4j locally to experiment with your own data. Start your local Neo4j Server in Neo4j Desktop (Download & Install), open Neo4j Browser. After logging in, install the Movies graph data set by entering the :play movies command, click the CREATE-statement, and hit the triangular "Run" button.

Configuration options

Environment variable name Default value (or N/A)

PORT

8080

NEO4J_URI

neo4j+s://demo.neo4jlabs.com

NEO4J_USER

movies

NEO4J_PASSWORD

movies

NEO4J_DATABASE

movies