Hi. I was in the same situation 2 days before. So I asked jchris via
twitter.
couchview has been replaced by couchapp. :)
But the example app made by topfunky still works.
thanks for very the reply and heads up on couchapp.
I've installed this as a gem and have tested out the generate and push
commands.
This new couchapp gem is for making standalone couchdb apps with
jquery and HTML. Where as the old couchview was handy utility for
generating and pushing views.
An example generate below. Generates views along with a lot of extras.
> This returns nothing but does push the views to the DB as _design/views. To get the correct view names i went deeper into the directory.
couchapp push db/views/notes notes_topfunky_development
> This resulted in a document with view names (by_tag-reduce etc)
being listed as attributes with the associated js content as the
value.
Would it be better to use the view structure from the peepcode instead
of this new couchapp generate and use the couchdb api to push?
thanks,
Adam
On Feb 2, 7:52 pm, Jai-Gouk Kim <jaig...@gmail.com> wrote:
> Hi. I was in the same situation 2 days before. So I asked jchris via
> twitter.
> couchview has been replaced by couchapp. :)
> But the example app made by topfunky still works.
On Mon, Feb 2, 2009 at 10:09 PM, adam <adam.mad...@redcoded.com> wrote:
> Would it be better to use the view structure from the peepcode instead > of this new couchapp generate and use the couchdb api to push?
Couchapp is equivalent to couchview, except for a few details about how it expects to see documents stored on the filesystem.
If I recall correctly, couchview takes something like this
views/test-map.js views/test-reduce.js
and pushes it to the views member of a design doc, which you'd specify on the command line, with a default of falling back to a directory name. Couchview does that job just fine, but it is no generalized to handle the other functions that can be stored in a design doc.
the CouchApp script takes a filesystem and pushes it transparently to a design doc, so the on-disk layout it expects is a little different:
you are free to leave any of that out (so if you only care about views then you should be able to use it just fine.)
currently the python version of couchapp also has the ability to "clone" from a url. I'm working on getting the ruby version back up to speed, but for now you might be happiest installing the python version.
> On Mon, Feb 2, 2009 at 10:09 PM, adam <adam.mad...@redcoded.com> wrote:
> > Would it be better to use the view structure from the peepcode instead
> > of this new couchapp generate and use the couchdb api to push?
> Couchapp is equivalent to couchview, except for a few details about
> how it expects to see documents stored on the filesystem.
> If I recall correctly, couchview takes something like this
> views/test-map.js
> views/test-reduce.js
> and pushes it to the views member of a design doc, which you'd specify
> on the command line, with a default of falling back to a directory
> name. Couchview does that job just fine, but it is no generalized to
> handle the other functions that can be stored in a design doc.
> the CouchApp script takes a filesystem and pushes it transparently to
> a design doc, so the on-disk layout it expects is a little different:
> you are free to leave any of that out (so if you only care about views
> then you should be able to use it just fine.)
> currently the python version of couchapp also has the ability to
> "clone" from a url. I'm working on getting the ruby version back up to
> speed, but for now you might be happiest installing the python
> version.