$self->render_static( $ANGULAR_JS );
};
+# CouchDB proxy for _design _view
+
+get '/:database/_design/:design/_view/:view' => sub {
+ my $self = shift;
+ my $url = $self->param('url');
+ warn "# /couchdb $url";
+ _render_jsonp( $self, _couchdb_get( $self->param('database') . '/_design/' . $self->param('design') . '/_view/' . $self->param('view') ) );
+};
+
app->start;
__DATA__
this.data = data;
this.xhr("JSON"
- , "http://localhost:5984/conference/_design/symposium/_view/work_nr%2Ctitle?callback=JSON_CALLBACK"
+ , "/conference/_design/symposium/_view/work_nr%2Ctitle?callback=JSON_CALLBACK"
, function(code, response){
console.log(code, response, data);
data.response = response;