couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Walgran" <jwalg...@gmail.com>
Subject Re: Hosting a Cappuccino application from CouchDB
Date Sat, 27 Dec 2008 05:19:33 GMT
The holiday season gave me some time to get back to trying to make
CouchDB and Cappuccino play nice. Here are some repro steps:

1) Download the starter kit
http://download.cappuccino.org/CappuccinoStarter-0.6.zip
2) Unzip and cd into the NewApplication directory
3) Copy the entire Frameworks directory to
/usr/local/share/couchdb/www (this will make the framework files
available from http://localhost:5984/_utils/Frameworks)

4) Edit index-debug.html
  Replace 'OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks",
"SomethingElse"];'
     with 'OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks",
"http://localhost:5984/_utils/Frameworks"];'

  Replace '<script src = "Frameworks/Debug/Objective-J/Objective-J.js"
type = "text/javascript"></script>'
     with '<script src =
"http://localhost:5984/_utils/Frameworks/Debug/Objective-J/Objective-J.js"
type = "text/javascript"></script>'

  Replace '<img src =
"Frameworks/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"
style="left: -32px; position: relative;
top: -32px;" />'
     with '<img src =
"http://localhost:5984/_utils/Frameworks/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"
style="left: -32px; position: relative; top: -32px;" />'

5) Create a new CouchDB database called 'helloworld'
6) Create a new document called '_design/helloworld'
7) Upload all the files as attachments to the '_design/helloworld' document
      AppController.j
      index-debug.html (with edits)
      index.html
      Info.plist
      main.j

8) Browse to http://localhost:5984/helloworld/_design%2Fhelloworld/index-debug.html
in Firefox+Firebug

You will see an error in firebug on line 1090 of Objective-J.js,
however setting a breakpoint on this line does not reveal the issue.

I feel like I am very close to consummating this marriage. Is there
anything on the CouchDB side of things that could be causing this
failure?

-Justin Walgran


On Fri, Nov 28, 2008 at 4:09 PM, Justin Walgran <jwalgran@gmail.com> wrote:
> That is incredibly helpful. Thank you.
>
> To take it a step further, I am very interested in Chris Anderson's
> work with distributing apps via CouchDB replication. Is there any way
> the LightsOut application could be incorporated as an attachment like
> Chris's Twitter application?
>
> - Justin Walgran
>
> On Fri, Nov 28, 2008 at 1:49 PM, Jan Lehnardt <jan@apache.org> wrote:
>> I tired with the LightsOff demo.
>>
>> Two ways:
>>
>> 1) Put the LightsOff directory into $prefix/share/couchdb/www/
>>
>> LightsOff can be accessed at http://127.0.0.1:5984/_utils/LightsOff/
>> (trailing slash is significant).
>>
>> 2) Add this to your $prefix/etc/couchdb/local.ini file:
>>
>> [httpd_global_handlers]
>> LightsOff = {couch_httpd_misc_handlers, handle_utils_dir_req,
>> "/path/to/LightsOff"}
>>
>> (see default.ini for more examples ot http global handlers)
>>
>> LightsOff can be accessed at http://127.0.0.1:5984/LightsOff/ (trailing
>> slash is significant),
>>
>> Cheers
>> Jan
>> --
>>
>> On 28 Nov 2008, at 10:24, Justin Walgran wrote:
>>
>>> The Cappuccino web framework (http://cappuccino.org/) relies on a
>>> library of javascript files in nested directories below a top-level
>>> Frameworks directory. Is there a way I can serve this up from Couch?
>>>
>>> - Justin Walgran
>>>
>>
>>
>

Mime
View raw message