This Neo4j-based example app displays movie and person data in a manner similar to IMDB.It is designed to serve as a template for further development projects.There are two versions of the backend - a Python/Flask backend at /flask-api
, and a JavaScript/Express backend at /api
.The web frontend can be found at /web
.Feel encouraged to fork and update this repo!
Movie
Person
Genre
(:Person)-[:ACTED_IN {role:"some role"}]->(:Movie)
(:Person)-[:DIRECTED]->(:Movie)
(:Person)-[:WRITER_OF]->(:Movie)
(:Person)-[:PRODUCED]->(:Movie)
(:MOVIE)-[:HAS_GENRE]->(:Genre)
Go to https://sandbox.neo4j.com/?usecase=recommendations&ref=movie-app-tutorial, pick "Recommendations", and press play to start the database.
Make sure to edit the file flask-api/.env
or api/.env
and update the MOVIE_DATABASE_USERNAME
,MOVIE_DATABASE_PASSWORD
, and MOVIE_DATABASE_URL
of your chosen backend to connect to your instance.
First, configure your api/.env
file to point to your database.
Then, from the root directory of this project:
cd api
nvm use
npm install
node app.js
starts the APIFirst, configure your flask-api/.env
file to point to your database.
Then, from the root directory of this project:
cd flask-api
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
export FLASK_APP=app.py
flask run
From the root directory of this project, set up and start the frontend with:
cd web
nvm use
npm install
web/.env
fileIf you are using the Node API set REACT_APP_API_BASE_URL
to http://localhost:3000/api/v0
If you are using the Flask api then set it to http://localhost:5000/api/v0
npm start
starts the app on http://localhost:3000/voilà! IMDB, eat your heart out ;-)
Based on my similarity to other users, user Omar Huffman
might be interested in movies rated highly by users with similar ratings as himself.
MATCH (me:User {name:"Omar Huffman"})-[my:RATED]->(m:Movie)
MATCH (other:User)-[their:RATED]->(m)
WHERE me <> other
AND abs(my.rating - their.rating) < 2
WITH other,m
MATCH (other)-[otherRating:RATED]->(movie:Movie)
WHERE movie <> m
WITH avg(otherRating.rating) AS avgRating, movie
RETURN movie
ORDER BY avgRating desc
LIMIT 25
The Express API is located in the /api
folder.
The API itself is created using the Express web framework for Node.js. The API endpoints are documented using Swagger.
To add a new API endpoint there are 3 steps:
/api/routes
directory/api/app.js
.The Flask API is located in the /flask-api
folder.The application code is in the app.py
file.
The API itself is created using the Flask-RESTful library.The API endpoints are documented using Swagger.
To add a new API endpoint there are 3 steps:
Movies Demo �� Demo for Nativescript Angular Speed Code Youtube Series Development This app is built with the NativeScript CLI. Once you have the CLI installed, start by cloning the repo: This app use
Neo是一个网络——面向网络的数据库——也就是说,它是一个嵌入式的、基于磁盘的、具备完全的事务特性的Java持久化引擎,但是它将结构化数据存储在网络上而不是表中。网络(从数学角度叫做图)是一个灵活的数据结构,可以应用更加敏捷和快速的开发模式。 你可以把Neo看作是一个高性能的图引擎,该引擎具有成熟和健壮的数据库的所有特性。程序员工作在一个面向对象的、灵活的网络结构下而不是严格、静态的表中——但是他
但是,当我尝试使用执行密码代码时,如下所示: 我在文件夹中没有找到。只有,但没有? 虽然我可以通过执行CQL,但它只是一步一步地运行代码。我想通过命令行用一个命令执行整个密码脚本。
我正在用graphql和Neo4J构建一个数据库api。我正在使用makeAugmentedSchema构建我的模式,它来自包neo4j-graphql-js,它根据您的模式为您生成突变和查询。我正在尝试添加一些自定义解析来帮助验证用户,但是,我可以弄清楚如何调用由makeAugmentedSchema创建的现有突变,或者这是否可能? 这是在我的服务器文件中,我正在创建这个扩展的模式,它创建了像创
我使用Neo4j ogm将许多(超过20个)类似的类映射到neo4j db中,这些类在关系名称、名称和方向上是不同的。每个类只使用一个方法实现分类接口,该方法在每个类中都是相同的(包括将关系添加到节点集合中) 示例节点: 类似地: 我正在寻找的可能性,以减少这些类似的类的数量,并创建。。。也许有一个泛型类,我可以在其中定义label、property name和realtionship类型。我更喜
neo4j-client 是 Neo4j 的命令行 shell (CLI)。它支持与 Neo4j 服务器的安全连接,发送语句(包括多行语句)、持久命令行历史记录以及将结果渲染成表或 CSV。 neo4j-client 使用 Bolt 网络协议,并可在任何支持 Bolt 的服务器上工作。 环境要求: neo4j-client 可在 GNU/Linux, Mac OS X 和 FreeBSD 平台上运