mikeal / node.couchapp.js

Utility for writing couchapps.
Apache License 2.0
406 stars 78 forks source link

Add development webserver with proxy to CouchDB #67

Closed zaro closed 11 years ago

zaro commented 11 years ago

This add serve command which is a simple HTTP static file server of attachments dir with integrated proxy to CouchDB based on the rewrites specified in app.js .

IMHO this makes development even simpler that sync, and also avoids lots of file uploads to the DB, especially if you code messy like me with a lot of small changes and experimenting. As a bonus if connect-compiler is installed .coffee file are compiled on the fly.

Basic usage is :

couchapp serve app.js http://localhost:5984/example_db

Now you can access your couchapp at http://localhost:3000/. When you think it is good enough for production :

couchapp push app.js http://localhost:5984/example_db
mikeal commented 11 years ago

this doesn't merge cleanly :(

zaro commented 11 years ago

Yeah, I see master has changed since I forked the repo. will rebase , and get back to you.

zaro commented 11 years ago

Ok, I think it is good now. I also added compiling of .coffee file on push.

Also after merging, couchapp was broken for me w/o specifying -dc. See 1689572 for details.

mikeal commented 11 years ago

you just won write access :)

zaro commented 11 years ago

Cool :) Thanks a lot.