views.reagent/examples/todomvc
2016-05-23 13:56:07 -04:00
..
resources update example todomvc app 2016-05-23 13:53:36 -04:00
src/todomvc update example todomvc app 2016-05-23 13:53:36 -04:00
.gitignore add todomvc app example 2014-12-28 00:56:19 -05:00
create_db.sql add todomvc app example 2014-12-28 00:56:19 -05:00
project.clj update example todomvc app 2016-05-23 13:53:36 -04:00
README.md update todomvc README.md 2016-05-23 13:56:07 -04:00

Reagent Data Views Example - Todo MVC

This is a modification of the Todo MVC app for Reagent demonstrated here. This version of the app has been modified to use a PostgreSQL database to store the Todos and to provide realtime synchronization of changes to that data to any number of users currently viewing the app.

Running

Since Reagent Data Views and the Views library it depends on are all currently in somewhat of an experimental / pre-beta state right now, you will need to first clone the following repositories and manually install the libraries via lein install:

As well, you can install views-honeysql if you want to try out using HoneySQL instead of SQL with views. But this example app does not use it so it's not required.

Once these libraries are installed, you can simply build the ClojureScript:

$ lein cljsbuild once

And then start up a REPL and run:

(-main)

Or more simply, just do:

$ lein run

Done either way, a new browser window should open to the app.

Alternatively, to build the ClojureScript and run the app all in one go:

$ lein rundemo

Open up a second browser and make changes by adding or deleting a Todo, or marking them as completed, etc. and see that the changes are instantly propagated to all clients.