A high-level, caching, CouchDB client for Node.js
Questions tagged [cradle]
71 questions
2
votes
1 answer
geocouch error on nodejs
I have 3 questions pertaining to geocouch on nodejs environment.
my code is as follows. The connection to the database is not happening and it does not print anything after "before connecting to database". what's wrong ?
var connection =…

user644745
- 5,673
- 9
- 54
- 80
2
votes
1 answer
Cradle CouchDB, What are the cradle.Connection function arguments?
Beginner Question.
Below is an example given on the Cradle CouchDB documentation:
https://github.com/cloudhead/cradle
What is http://living-room.couch?
What is 5984?
new(cradle.Connection)('http://living-room.couch', 5984, {
cache: true,
…

edt
- 22,010
- 30
- 83
- 118
2
votes
1 answer
How to create multiple attachments in one call with cradle
I'm working on a nodejs application and am inserting two attachments to a couchdb with cradle. Currently I am inserting the first attachment, getting the updated doc, and then inserting the second attachment with the updated _rev key. This is…

Patrick Connelly
- 127
- 6
2
votes
3 answers
emit doc twice with different key in couchdb
Say I have a doc to save with couchDB and the doc looks like this:
{
"email": "lorem@gmail.com",
"name": "lorem",
"id": "lorem",
"password": "sha1$bc5c595c$1$d0e9fa434048a5ae1dfd23ea470ef2bb83628ed6"
}
and I want to be able to query the…

fraserxu
- 420
- 3
- 8
2
votes
1 answer
How to query the CouchDB data with the start date and end date
In my node application I am using the Cradle library to save the data in CouchDB.
Now I want to get the stored data with the specified start date and end date.
How can I do this. I have added design document as below. Is it correct?
How to pass my…

sachin
- 13,605
- 14
- 42
- 55
2
votes
1 answer
Calling variables outside couchdb function?
I'm having alot of trouble getting couchdb's response handlers to do anything useful with node.js and now.js. My aim is to call back to a client or group with certain information that's been found and also sent from a client.
everyone.now.login =…

Verbium
- 57
- 1
- 5
1
vote
1 answer
Passing parameters to views in couchdb via cradle
Is there a way we could pass in values to a view function other than a key?
In the database I have a list of places with coordinates, and I want to get all the places within a distance from a point. So my view function should be able to access a…

mabounassif
- 2,311
- 6
- 29
- 46
1
vote
1 answer
Verify uniqueness of a value in a column in CouchDB cradle
I have a CouchDb table for cookies with ids and access tokens. I want to create a new cookie for a given token, only if that token doesn't already exist in our table. How could I do that in CouchDb with cradle for nodejs?

mabounassif
- 2,311
- 6
- 29
- 46
1
vote
2 answers
How do I use Node.js Cradle with multiple keys?
I've been trying to use multiple keys in Cradle for a good time, I'm almost giving up since I can't find help anywhere.
I use this query with an HTTP request and it brings me…

Victor Debone
- 155
- 8
1
vote
1 answer
Strange error with express and cradle
I can't explain any better, because I honestly have no idea why this error exists. First off, here is the code where I get the error:
app.get '/image/:id', (req, res, next) ->
images.get req.params.id, (err, doc) ->
if err then next err…

Lanbo
- 15,118
- 16
- 70
- 147
1
vote
1 answer
Cradle / Express / EJS convert html to its entities
I'm using Cradle with Express and EJS on my blog. Maybe i am missing smth but some of them converts html entities to its equivalents.
I have html in doc.quote field and after this piece of code it changes
quotesDb.view('list/by_date', {
…

Dmitrii Sorin
- 3,855
- 4
- 31
- 40
1
vote
2 answers
What do I get this Error: EADDRINUSE, Address already in use when stress-testing Node.js with cradle and CouchDB?
I am trying to measure the throughput of a simple Node.js program with a CouchDB backend using cradle as the DB driver. When I put load against the program I get the following error within 30 seconds:
EADDRINUSE, Address already in use
Here is my…

MarcFasel
- 1,080
- 10
- 19
1
vote
3 answers
CouchDB, Node.js, Cradle - How to get data based on returned data
I am working on a messaging system using node.js + cradle and couchdb.
When a user pulls a list of their messages, I need to pull the online status of the user that sent them the message. The online status is stored in the user document for each…

Brian
- 137
- 1
- 9
1
vote
2 answers
How to get a CouchDB _list result with Cradle
In Node, using Express and Cradle, I have a call to a _list that does not work. Other calls go to _view and work fine. The Cradle documentation does not include a section on _list but it seems from this GitHub readme that it is supposed to work just…

KTys
- 170
- 1
- 9
1
vote
3 answers
CouchDB/Cradle How do I add images?
So Basically I want to let the user have the option of uploading an image when they register. I have no idea where to start forever. I know that CouchDB supports attachments, but how exactly does that work with Cradle.
I found the following code in…

Ernesto11
- 281
- 1
- 3
- 6