From user-return-11822-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon Aug 02 23:52:29 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 99014 invoked from network); 2 Aug 2010 23:52:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Aug 2010 23:52:29 -0000 Received: (qmail 93520 invoked by uid 500); 2 Aug 2010 23:52:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 93442 invoked by uid 500); 2 Aug 2010 23:52:28 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 93434 invoked by uid 99); 2 Aug 2010 23:52:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 23:52:27 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 23:52:23 +0000 Received: by qyk31 with SMTP id 31so539835qyk.11 for ; Mon, 02 Aug 2010 16:52:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.54.140 with SMTP id q12mr2240399qag.319.1280793121728; Mon, 02 Aug 2010 16:52:01 -0700 (PDT) Received: by 10.229.95.204 with HTTP; Mon, 2 Aug 2010 16:52:01 -0700 (PDT) Date: Mon, 2 Aug 2010 18:52:01 -0500 Message-ID: Subject: Sinatra app as an external processes From: Geoff Buesing To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015175cb0580d2a4a048cdfe366 --0015175cb0580d2a4a048cdfe366 Content-Type: text/plain; charset=ISO-8859-1 I've pulled together a Rack adapter for Couch's external protocol, which allows you to run a Sinatra app as an external. More details in the Readme: http://github.com/gbuesing/couchdb-rack I built this so that I could mount some legacy Ruby code as small services to be consumed browser-side by an Evently Couchapp. This approach saves me from having to set up another web server to host the Ruby code. Also, I have access to the userCtx within Sinatra if I need it. Interested in feedback on this approach, and/or if others would find this code useful. --0015175cb0580d2a4a048cdfe366--