Questions tagged [couchdb-nano]

Nano is the Official Apache CouchDB library for Node.js.

Nano is the Official Apache CouchDB library for Node.js.

132 questions
0
votes
1 answer

couchdb, use middleware or not? Which for simple restful API, with express4 nodejs

I don't find a lot of examples about couchdb with nodejs and express4. I've seen there are on npm: https://www.npmjs.com/package/node-couchdb https://www.npmjs.com/package/nano they are compatible with couchdb 2? or there is a way to work without…
stackdave
  • 6,655
  • 9
  • 37
  • 56
0
votes
1 answer

How to retrieve data from db in couchdb

I am trying to fetch data from couch and i follwed the code below var request = require('request') var nano = require('nano')('http://localhost:5984/user'); var url = 'http://127.77.3.1:5984/' var db = 'users2/' var id =…
klp
  • 153
  • 1
  • 3
  • 14
0
votes
1 answer

does not eval to a function error in couch db

I'm using Couchdb 1.6.1. I have a show inside test design. { "select": { "map": "function(a){emit(null,a._id)}" } } i'm using Nano Node modules to interact with the database. When i run js file below this { Error: Expression does not…
s1n7ax
  • 2,750
  • 6
  • 24
  • 53
0
votes
0 answers

CouchDB bulk copy operation doesn't send back callback

I'm using nano db library (also try this with cloudant ant library) for node js I have this sample code : exports.insert = function (db_name, data, callback) { var db_name=db_name; if(!db){ db = nano.use(db_name); } console.log(`try…
Yossi
  • 337
  • 1
  • 2
  • 10
0
votes
1 answer

Nanodb replication filter

I have a db called: 'sample' I have _design doc that look like: { "_id": "_design/orgFilter", "_rev":"9-7cd70d5ca52ddd42a3ff953c01d7cd36", "views": { "newView": { "map": "function(doc) { if(doc.type &&…
Yossi
  • 337
  • 1
  • 2
  • 10
0
votes
2 answers

Bluebird promises in NodeJS, not getting to then

I'm attempting to use bluebird promises in NodeJs with nano a library used with couchDb. I use the promisfy and when I look get the new async methods. In the following example, the nano.db.listAsync call works out fine, but I never get to the .then…
jeff
  • 3,269
  • 3
  • 28
  • 45
0
votes
0 answers

database keeps getting deleted - couchdb, nodeJS, nano & Bluebird

I am using couchdb, and I am running the following code with the following packages (nano & Bluebird) nano = nano(uri) var db_name = Promise.promisifyAll(nano.db.use(resources.db.name)) exports.db_init = function () { return new…
0
votes
1 answer

using promises in nodejs and couched/nano

Trying to use the Q promises library with couchDB and Nano. I have the following code and the messages are displayed in the console but the database is not created. var nano = require('nano')('http://localhost:5984'); var Q = require('q'); var…
Mark Tyers
  • 2,961
  • 4
  • 29
  • 52
0
votes
1 answer

GeoCouch support in Node.js

I would like to use [GeoCouch](https://github.com/couchbase/geocouch/) and CouchDB with Node.js and just wondering whether Nano Cradle are supporting GeoCouch views?
user977828
  • 7,259
  • 16
  • 66
  • 117
0
votes
1 answer

couchdb/nano multipart insert

I'm trying to use nano to insert a document with multiple image attachments. The following test case runs without failure: var dbName = 'testdb'; var encoding = 'base64'; var fs = require('fs'); var nano =…
DomJack
  • 4,098
  • 1
  • 17
  • 32
0
votes
1 answer

What order do things happen in streams in node.js

I'm trying to understand what order things happen in node.js streams. The script I'm running takes a collection of name/email pairs, runs over that collection, creates a couchdb entry for each, then generates a QR code and inserts it in that couchdb…
Costa Michailidis
  • 7,691
  • 15
  • 72
  • 124
0
votes
1 answer

Handle 409 conflict document nodejs nano couchdb

I've been doing some research on this matter, that couchdb gives too many document conflicts. I've seen a solution Updating a CouchDB document in nano saying this: Get document Save the _rev Apply changes Try to send updated document with saved…
cuzmAZN
  • 377
  • 1
  • 7
  • 25
0
votes
2 answers

Multiple image attachments to couchdb (nano) with Node.js Express 4.0 & formidable

I am trying to insert multiple images to couchdb via nano using express 4 and formidable. I can access and insert individual files without difficulty using formidable and nano, however, when I try to insert one file after another, I get conflict…
0
votes
1 answer

Saving data from 3rd party API to CouchDB using AngularJS

I have a working frontend app build with AngularJS. It interacts with a couple of 3rd party APIs and is getting data without a problem. The next step of the app would be to store this data into a CouchDB everytime a search is made. I want to build…
Eric Mitjans
  • 2,149
  • 5
  • 40
  • 69
0
votes
1 answer

Create users own document in CouchDB with node.js

I want to make documents, which can be updated/changed by one concrete user(the user which has created it). Document content wich all users can see but only the owner can change it. The question is: If I have user with username "TheUser" how can…
1 2 3
8
9