X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=README;h=096fb1ea08c39dc87df2b4fe620b1afe68f1241a;hb=8fa3d092ebc2dfe6ccca3ec97bff7b65fe1d472a;hp=b880463c4b6ee3f654b21e70e9fa1ad2a747701c;hpb=6ec8b155dd562746fec37ffcb712406d42e8295a;p=angular-mojolicious.git diff --git a/README b/README index b880463..096fb1e 100644 --- a/README +++ b/README @@ -17,7 +17,8 @@ using CouchDB HTTP view API http://wiki.apache.org/couchdb/HTTP_view_API -to provide storage for experimenting with local datasets using angular. +to provide storage for experimenting with local datasets using angular $resource API. +You can also query CouchDB views $xhr("JSON", ...) in angular through angular-server.pl At it's current stage it provides support for angular $resource get, query and $save @@ -25,6 +26,14 @@ At it's current stage it provides support for angular $resource get, query and $ http://angularjs.org/Service:$resource +Data can also be serve static json files stored in: + + public/json/:database/:entity/:key + +which can be used to provide data using external stand-alone scripts. + + + Replication of data between instances using angular REST API can be done with: # create local CouchDB database @@ -58,11 +67,49 @@ Angular examples available: - template/Cookbook - examples from wiki working against github version of angular - template/conferece - conference submission example using mojolicious REST API server +- public/app/conference - new application layout with latest example confernce submission curl -X PUT http://localhost:5984/conference/_design/symposium \ -d @public/app/conference/_design/symposium -Planned features: -- run queries against data using REST API (currently only simple get is supported) +CouchDB examples: + + couchdb-changes.pl - simple _changes feed watcher using Mojo::Client documented at + + http://wiki.apache.org/couchdb/HTTP_database_API#Changes + + + couchdb-trigger.pl - FSM document with hook for user-defiend triggers + + trigger/shell.pm - execute shell commands + trigger/email.pm - skeleton for sending e-email + trigger/KinoSearch.pm - full-text search + + $ curl -X PUT http://localhost:5984/demo + {"ok":true} + + $ ./couchdb-trigger.pl http://localhost:5984/demo trigger/shell.pm + + $ curl -X PUT http://localhost:5984/demo/t1 -d '{"trigger":{"command":"notify-send CouchDB t1"}}' + + + couchdb-external-kinosearch.pl - external searcher for KinoSearch indexes + (configuration for CouchDB is included at end of file) + + $ ./couchdb-trigger.pl http://localhost:5984/demo trigger/KinoSearch.pm + + $ curl -X PUT http://localhost:5984/demo/text -d '{"text":"foobar bla bla"}' + {"ok":true,"id":"text","rev":"1-cf9bb608f93af7f4e5e40656a6e50096"} + + $ curl 'http://localhost:5984/demo/_kinosearch?include_docs=true;q=foobar' + + + +Roadmap: + ++ implement angular-server.pl which implements REST API supported by $resource in angular ++ persistency to local CouchDB, and use views to query data ++ implement CouchDB _changes and FSM inside document as base for queue or triggers +- tests