Hi Nick,
kxepal would be better to give you details on the status of the new rewrite 
function, but to my best knowledge the code is to be found here:

https://github.com/apache/couchdb/pull/370 
<https://github.com/apache/couchdb/pull/370>
https://github.com/apache/couchdb-couch/pull/127 
<https://github.com/apache/couchdb-couch/pull/127>
https://github.com/apache/couchdb-chttpd/pull/96 
<https://github.com/apache/couchdb-chttpd/pull/96>
https://github.com/apache/couchdb-couch-mrview/pull/36 
<https://github.com/apache/couchdb-couch-mrview/pull/36>

Another discussion that you might be interested in if you want to use the couch 
web server directly and not behind a server is this discussion

http://mail-archives.apache.org/mod_mbox/couchdb-couchapp/201511.mbox/%3ccahw0xrtu8npjbr3%2bvvwysp5t2f%2by4w_zbdavpj_8bjnu4qd...@mail.gmail.com%3E
 
<http://mail-archives.apache.org/mod_mbox/couchdb-couchapp/201511.mbox/%3ccahw0xrtu8npjbr3+vvwysp5t2f+y4w_zbdavpj_8bjnu4qd...@mail.gmail.com%3E>

For now my workaround for multi request was to use a global handler to point to 
a small node.js query server that execute code stored in a couch db.
This way it's not problem to include multi request with promise chains etc as 
part of the routes in the new rewrite function, translate to the "backend" 
server the returns the composite content, or e.g. respons from a web service 
that you called or scraped content with some of your own data added and. The 
return can be served with your own html template.

I hear echoes from earlier discussions about couchapps in the back of my head 
now: So why this workaround to avoid a proxy in front?
The backend service is just one for all your servers/sites, totally generic 
since all the data reside in couch
This means that your systems can be replicated, all of it (apart from the web 
services attached of course), not just the data, e.g. if you want to use 
couchdb as a platform to deploy sites in one click
You can work in the incredibly well designed IDE for couch, Ddoc Lab, that you 
can find here http://ddoc.me/ <http://ddoc.me/>. This is awsome, dont be fooled 
by the clean UI. It replaces a lot of tools when you get into it, and it gives 
you a whole new perspective on "couchapps" ( I use the terms "Ddco lab", "couch 
site" and "design document" to avoid confusion).

johs

> On 16. apr. 2016, at 00.45, Nick <oinksoc...@letterboxes.org> wrote:
> 
> On 15/04/16 16:29, Johs Ensby wrote:
>> Hi Nick,
>> the revolution comes with a new rewrite function (path list is not a static, 
>> but a function that can return path, status code, body, headers based on the 
>> request object en user environment. This enable you to make a router, 
>> firewall to allow jsut certain ip-range etc. 
>> 
>> The code was committed in November by Alexander Shorin <kxe...@gmail.com> , 
>> but I don't know when to expect a release (1.7)
>> What I can say after testing it, is that it is a totally new world for 
>> couchapps
> 
> Thanks, sounds tantalising... are there any detailed specs?  Can't spot it 
> here:
> 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310780&version=12326160
> 
> In the mean time I assume that means the answer is "no change"?
> 
> 
> 
> 

Reply via email to