Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

neo4j-contrib/training-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neo4j Training Backend

Heroku App: http://neo4j-training-backend.herokuapp.com

Usage:

We use a session id generated by the front-end to control user sessions, it will usually be an UUID.

// execute query, reads or updates
curl -H X-Session:123 -XPOST http://neo4j-training-backend.herokuapp.com/backend/cypher/:id -d'MATCH (n) RETURN n'

// initialize
curl -H X-Session:123 -XPOST http://neo4j-training-backend.herokuapp.com/backend/cypher/:id

// delete, cleanup memory session
curl -H X-Session:123 -XDELETE http://neo4j-training-backend.herokuapp.com/backend

With persistent session handling:

// store database setup with provided id
curl -H X-Session:123 -XPOST http://neo4j-training-backend.herokuapp.com/backend/graph/:id \
 -d'cypher statement(s)'

//e.g.
curl -H X-Session:123 -XPOST http://neo4j-training-backend.herokuapp.com/backend/graph/users-graph \
 -d'create (:User {name:"Andreas"}),(:User {name:"Michael"})'

// delete persisted session state also removes the in-memory session with the same id if any
curl -H X-Session:123 -XDELETE http://neo4j-training-backend.herokuapp.com/backend/graph/:id

// e.g
curl -H X-Session:123 -XDELETE http://neo4j-training-backend.herokuapp.com/backend/graph/users-graph
curl -H X-Session:123 -XDELETE http://neo4j-training-backend.herokuapp.com/backend/graph/123

// initialize with session-id, fallback to the provided init-id
// returns also previously stored history
curl -H X-Session:123 -XPOST http://neo4j-training-backend.herokuapp.com/backend/cypher/users-graph

// on shutdown/timeout changed database state and input history is saved to storage
// so on next init the modified state will be used as initial state and stored history will be returned

Run locally:

mvn exec:java

About

Neo4j Training Backend for Online Course with Versal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages