Hi all, just a quick mail to announce the start of coiuchapp_legacy project. It aims to be a new CouchApp engine. It's for now distributed as a Apache CouchDB plugin;
https://github.com/benoitc/couchapp_legacy/tree/master/src couchapp_legacy only offer for now a new and improved CouchApp URL rewriter but will offer more during the coming days. You have now regex based dispatching : Or more complex rule: { "from": "/(?<func>\\w*)-(?<name>\\w*)/(?<post_no>\\w*)$", "to": "/_(?<func>)/(?<name>)/(?<post_no>)" } Url http://127.0.0.1:5984/testdb/_design/test/_app/show-post/test is rewritten to http://127.0.0.1:5984/testdb/_design/test/_show/post/test But you can still do reverse URL dispatching (principle borrowed to erlweb): { "from": "/page/:page", "to": "/_show/post/:page", "options": { "patterns": { "page": "\\w*" } } } Url http://127.0.0.1:5984/testdb/_design/test/_app/page/test is rewritten to http://127.0.0.1:5984/testdb/_design/test/_app/_show/post/test Other fancy stuffs are : - support for different handlers to handle an url. You can use "classic" handler that aliasing internals urls, proxy handler that proxy an url to another server (It's using internally the new proxy feature of Apache CouchDB 1.1 and more soon. - routes are cached. - direct routing (/db/_design/name/_app/<path>) is rewritten directly without substiturion - aliasing - attachment handling. You can directly link to attachments in urls Next things in couchapp_legacy will be a new way to manage shows, updates and lists function using erlv8 or emonk. etc... That's it for now. More doc is available on the repository and an example is provided. enjoy, - benoƮt
