![]() |
---|
Interface for app |
![]() |
---|
Result of the query |
- Download and install
noe4j
https://neo4j.com/download/ - Open
neo4j
and createNew Project
- Name the project
Recipe Recommendation
- Create a new database
Recipes
and set password123
and select theGraph DB
as its type. - Now import the `csv file for into the project Resource
- Now create the associations
LOAD CSV WITH HEADERS FROM 'file:///recipes_img.csv' AS row
WITH row WHERE row.name IS NOT NULL
MERGE (rec:recipe {name: row.name, time:row.time, link:row.link, image:row.image})
WITH rec, row
UNWIND split(row.ingredient, ',') AS i
MERGE (c:ingredient {name: lTrim(rTrim(i))})
MERGE (rec)-[r:NEED]->(c)
Note:
- Neo4j database internal structure
- Neo4j desktop store database inside its application folder
(
~/.config/Neo4j Desktop/relate-data/dbmss
on linux). - Each database have its own folder (e.g.
dbms-9ffccc4b-5842-4e9a-91d8-7b1edd4a53b4
) - The
.csv
file to be imported are stored in the/import
subdirectory.
- Neo4j desktop store database inside its application folder
(
cd nodejs-app
npm install
- install node modulesnode app
- launch node app
npm install nodemon -g
nodemon