projects
/
angular-mojolicious.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
working CouchDB view server in perl
[angular-mojolicious.git]
/
README
diff --git
a/README
b/README
index
45493f5
..
c0fd38f
100644
(file)
--- a/
README
+++ b/
README
@@
-26,14
+26,23
@@
At it's current stage it provides support for angular $resource get, query and $
http://angularjs.org/Service:$resource
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
Replication of data between instances using angular REST API can be done with:
# create local CouchDB database
- curl -X PUT http://localhost:5984/test
+ $ curl -X PUT http://localhost:5984/demo
+ {"ok":true}
- ./angular-replicate.pl \
+
$
./angular-replicate.pl \
http://dpavlin.getangular.com/data/conference \
http://dpavlin.getangular.com/data/conference \
- http://localhost:3000/data/
test
+ http://localhost:3000/data/
demo
Replication is currently good only for initial import of data since it doesn't
support incremental replication and dies if data is allready present.
Replication is currently good only for initial import of data since it doesn't
support incremental replication and dies if data is allready present.
@@
-41,18
+50,18
@@
support incremental replication and dies if data is allready present.
Installation:
Installation:
- git submodule init
- git submodule update
+
$
git submodule init
+
$
git submodule update
Optionally build angular to get single file download
Optionally build angular to get single file download
- cd public/angular
- rake compile
- cd -
+
$
cd public/angular
+
$
rake compile
+
$
cd -
Start it with:
Start it with:
- ./angular-server.pl daemon --reload
+
$
./angular-server.pl daemon --reload
Angular examples available:
Angular examples available:
@@
-61,14
+70,14
@@
Angular examples available:
- template/conferece - conference submission example using mojolicious REST API server
- public/app/conference - new application layout with latest example confernce submission
- 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 \
+
$
curl -X PUT http://localhost:5984/conference/_design/symposium \
-d @public/app/conference/_design/symposium
CouchDB examples:
-d @public/app/conference/_design/symposium
CouchDB examples:
- couchdb-changes.pl - simple _changes feed watcher using Mojo::
Cli
ent documented at
+ couchdb-changes.pl - simple _changes feed watcher using Mojo::
UserAg
ent documented at
http://wiki.apache.org/couchdb/HTTP_database_API#Changes
http://wiki.apache.org/couchdb/HTTP_database_API#Changes
@@
-79,20
+88,24
@@
CouchDB examples:
trigger/email.pm - skeleton for sending e-email
trigger/KinoSearch.pm - full-text search
trigger/email.pm - skeleton for sending e-email
trigger/KinoSearch.pm - full-text search
- $ curl -X PUT http://localhost:5984/
trigger_
demo
+ $ curl -X PUT http://localhost:5984/demo
{"ok":true}
{"ok":true}
- $ ./couchdb-trigger.pl http://localhost:5984/
trigger_
demo trigger/shell.pm
+ $ ./couchdb-trigger.pl http://localhost:5984/demo trigger/shell.pm
- $ curl -X PUT http://localhost:5984/trigger_demo/t1 -d '{"trigger":{"command":"notify-send CouchDB t1"}}'
+ $ curl -X POST http://localhost:5984/demo/ -H 'Content-type:application/json' -d \
+ '{"trigger":{"command":"notify-send \"CouchDB trigger notify example\""}}'
couchdb-external-kinosearch.pl - external searcher for KinoSearch indexes
(configuration for CouchDB is included at end of file)
couchdb-external-kinosearch.pl - external searcher for KinoSearch indexes
(configuration for CouchDB is included at end of file)
- $ ./couchdb-trigger.pl http://localhost:5984/trigger_demo trigger/KinoSearch.pm
+ $ ./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/
trigger_
demo/_kinosearch?include_docs=true;q=foobar'
+ $ curl 'http://localhost:5984/demo/_kinosearch?include_docs=true;q=foobar'