|
Note
|
You need to have JDK 11 installed. |
You can either built the complete project, including the examples. Thus, the examples will use your copy of SDN/RX, and any potential changes you made:
git clone [email protected]:neo4j/sdn-rx
cd sdn-rx
./mvnw -DskipTests -Drevision=1.0.0 -Dchangelist=-SNAPSHOT clean packageIf you want to only try out the examples with the currently released version,
pick out the example you like (for example the reactive-web example) and build it like this:
git clone [email protected]:neo4j/sdn-rx
cd sdn-rx/examples/reactive-web
mvn -DskipTests clean package
cd ../..You’ll need a Neo4j 4 instance that supports reactive database access and has a user name neo4j with a password of secret.
Please use :play movies in Neo4j browser to get some data in your graph.
With from SDN/RX root folder run
java -jar examples/reactive-web/target/movie-api.jarIf your database has different credentials or is on a different host, run
java -jar examples/reactive-web/target/movie-api.jar \
--org.neo4j.driver.uri=neo4j://yourhost:7687 \
--org.neo4j.driver.authentication.username=youruser \
--org.neo4j.driver.authentication.password=yourpasswordwith parameters fitting to your needs.
Here are some curl commands, you can try out.
The same examples are also available in the file movie-api-examples.http that you can call from IDEA.
curl -X "PUT" "http://localhost:8080/movies" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"title": "Aeon Flux",
"description": "Reactive is the new cool"
}'curl http://localhost:8080/moviescurl http://localhost:8080/movies/by-title\?title\=Aeon%20Fluxcurl -X DELETE http://localhost:8080/movies/847To make playing with the examples a bit easier, we have support for VS Code Remote Development. Please follow the instructions at the link above for setting up your Visual Studio Code environment.
Open reactive-web in Visual Studio Code and let it build the container.
The container will for now contain a locally build snapshot of SDN/RX that serves as dependencies for the example.
The example than can be build and run via Visual Studios support for Spring Boot, which is automatically added to the development container.
The running example can be accessed from the outside as shown above without any further actions.
At the moment, a locally running Neo4j 4.0 instance is still required, as there is no officially available image yet.