Commit 025d7f9f authored by Mathieu leclaire's avatar Mathieu leclaire

Update README.md

parent f8b0d4b5
......@@ -8,23 +8,34 @@ The project aims at building a small but complete client / server application us
- [scala.rx](https://github.com/lihaoyi/scala.rx)
- [autowire](https://github.com/lihaoyi/autowire)
as well as the [http://d3js.org/](D3.js) library.
as well as [scaladget](https://github.com/mathieuleclaire/scaladget) to take adavantage of the mapping of the [http://d3js.org/](D3.js) library.
This prototype exposes a Graph editor inspired from [http://bl.ocks.org/cjrd/6863459](http://bl.ocks.org/cjrd/6863459) javascript example.
## Build & Run ##
## Build & Run##
First, build the javascript:
```sh
$ cd scalaTraJSTagsWireRx
$ sbt
> toJS // Build the client JS files
> container:restart // Start the server
> fullOptJS // Build the client JS files
```
Then move the generated js to the scalatra webapp directory (this operation should be done automatically and in a cleaner way to avoid to move some files in the server sources ...). Nevertheless, it gives the idea in the scope of this demo project.
```sh
$ cp client/target/scala-2.11/client-opt.js server/src/main/webapp/js/
```
Then open [http://localhost:8080/](http://localhost:8080/) in your browser.
Finally, start the server (in your previous sbt session):
```sh
> container:restart // Start the server
```
## Play with the graph ##
Open [http://localhost:8080/](http://localhost:8080/) in your browser.
The demo provides with a small graph based on d3.js library. Try to :
- drag the nodes to move them
- shift-click on graph to create a node
- shift-click on a node and then drag to another node to connect them with a directed edge
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment