Update README.md

Adding documentation on visualizer (lines 65-79)
This commit is contained in:
Dabaez 2015-04-26 15:32:21 -04:00
parent 7fa20fc306
commit 1554b6ca51

View file

@ -41,6 +41,11 @@ If you prefer to build from source, see the documentation on the wiki at [How to
./cayley repl --dbpath=data/testdata.nq ./cayley repl --dbpath=data/testdata.nq
``` ```
To run the web frontend, replace the "repl" command with "http"
```
./cayley http --dbpath=data/testdata.nq
```
You should see a `cayley>` REPL prompt. Go ahead and give it a try: You should see a `cayley>` REPL prompt. Go ahead and give it a try:
``` ```
@ -61,6 +66,18 @@ cayley> graph.Vertex("dani").All()
cayley> graph.Vertex("dani").Out("follows").All() cayley> graph.Vertex("dani").Out("follows").All()
``` ```
**Running the visualizer on the web frontend**
To run the visualizer: click on visualize and enter:
```
// Visualize who dani follows.
g.V("dani").Tag("source").Out("follows").Tag("target").All()
```
The visualizer expects to tag nodes as either "source" or "target." Your source is represented as a blue node.
While your target is represented as an orange node.
The idea being that our node relationship goes from blue to orange (source to target).
**Sample Data** **Sample Data**
For somewhat more interesting data, a sample of 30k movies from Freebase comes in the checkout. For somewhat more interesting data, a sample of 30k movies from Freebase comes in the checkout.