Questions tagged [couchapp]

CouchApps are JavaScript and HTML5 applications served directly from CouchDB.

CouchApps are JavaScript and HTML5 applications served directly from CouchDB.

224 questions
3
votes
1 answer

Analytics counter using sofa and couchApp

Couch has a REST interface. This means that data-updates are exclusive to PUT calls. I'm inspecting ways to implement a humble analyics counters, and came accross the features of couchdb, sofa and couchapp - which are kin'da cool, having in mind my…
Radagast the Brown
  • 3,156
  • 3
  • 27
  • 40
3
votes
1 answer

Serving static HTML from CouchDB

I've got a CouchDB server up and running serving basic API requests. Overall it works well because users can GET/POST/PUT etc. to the host 'api.example.com'. The only issue is that if a user does a GET request for '/', they get the…
Nate
  • 331
  • 3
  • 9
3
votes
1 answer

access session information from couchdb views

I'm new to couchdb/couchapp. I'm wondering if it's possible to access _session information from couchdb views. For example: function(doc) { if (doc.username == session.userCtx.name) { emit(doc.username, doc); } };
Michal Kuklis
  • 871
  • 11
  • 14
3
votes
1 answer

Progressdialog stuck using couchbase

I am using the replication service from couchbase in one of my project. I would like to show the replication progress using a Progressdialog with percentage. As the documentation says I am doing this in an AsyncTask so @Override protected…
JoCuTo
  • 2,463
  • 4
  • 28
  • 44
3
votes
1 answer

Short and unique keys in CouchDB

I want to write a URL shortener as a standalone CouchApp, but I'm wondering if it is possible. Obviously, a core requirement for a URL shortener is to have short and unique keys. What I want is to POST a long URL to CouchDB and get a shortened URL.…
Daniel Hepper
  • 28,981
  • 10
  • 72
  • 75
3
votes
1 answer

How to TDD for CouchDB with CouchApp?

Recently I've discovered CouchDB. I want to use CouchApp to build a flash games site. It looks like a perfect fit 'cause this kind of a site is totally document based with a bit of binary attachments. The only thing I need to learn before I start is…
Nek
  • 1,909
  • 20
  • 31
3
votes
2 answers

Couchdb: relational database capabilities

Let's assume that I have a list of 239800 documents like the following: { name: somename, data:{age:someage, income:somevalue, height:someheight, dumplings_consumed:somenumber} } I know that I can index the doc by doc.data.age,…
Oo.oO
  • 33
  • 3
3
votes
1 answer

Sammy mustache - not working (variables in double braces not replaced with values)

I'm trying to write my first webapp using sammy and mustache templating. The template doesn't seem to render correctly (variables in double braces are not replaced with values). Here's the relevent part of index.html --
Vaibhav K
  • 388
  • 1
  • 6
2
votes
1 answer

couchdb - integrating a legacy authentication module to a couchapp

Is there a way I can integrate authentication from a legacy system to a couchapp? I mean, I have a system with user-accounts and all, and it's written in some legacy languages, and it should not matter which they are. However life go on, and I…
Radagast the Brown
  • 3,156
  • 3
  • 27
  • 40
2
votes
2 answers

Can I return the new revision in the response for an update handler?

I have a CouchDB update handler and would like it to return a response similar to a regular document PUT or POST. So something along the lines of the following on a successful update. {"ok": true, "id": "some_doc_id", "rev":…
David V
  • 11,531
  • 5
  • 42
  • 66
2
votes
1 answer

Couchapps and Users handling

I have an instance of couchdb where I want to deploy two couchapps. So far for registering user, I see that the rule of thumb is to use the authentication_db defined in the configuration file under [couch_httpd_auth]. But having two couchapps means…
Spredzy
  • 4,982
  • 13
  • 53
  • 69
2
votes
1 answer

Using underscore.js in Kanso

Kanso.js is a tool to easily let you build couchapps. As can be read in the documentation it includes the underscore.js module. But how can I exactly make use of the underscore.js methods in, let's say, a list view? Do I have to require it first?…
Maarten
  • 635
  • 2
  • 8
  • 22
2
votes
1 answer

Why does evently suggest $$(this) to save state?

As explained here, to save state which must be accessible in different events, $$(this) is recommended, like this: $$(this).filters = "myvalue"; What does that syntax mean? Why $$ (double dollar)? Why this? Why the () (parentheses)? That code is…
blueFast
  • 41,341
  • 63
  • 198
  • 344
2
votes
1 answer

How to get SUM of all CouchDB values?

How to extract SUM depending on ID or something, with goal of getting SUM of all values? I am able to get all values but canot SUM beacouse its a single variable, so there must be some kind of segmentation to SUM them?? any ideas? $db =…
Davor Zubak
  • 4,726
  • 13
  • 59
  • 94
2
votes
1 answer

CouchDb - Prevent couchDb from delivering a view

I made a list to filter view result because of security issues. The list filters a defined view in the database according to the user session attributes. Thats exactly what I wanted. Example Uri:…
fadh
  • 43
  • 2