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
17
votes
1 answer

How do create couchdb design docs with Nano in Node.js?

Looking through the README it doesn't look there is a way to create design docs with Nano? What are others doing for this?
timsavery
  • 183
  • 1
  • 6
7
votes
1 answer

Doc not found/missing after being inserted in couchdb database

I'm trying to create a simple db called '_users' and insert a new user into it using Couch-DB. I'm using Node in the shell to run the following code: UserProfile.js var nano = require('nano')('http://localhost:5984') module.exports = { …
David J.
  • 1,753
  • 13
  • 47
  • 96
6
votes
2 answers

Authentication with node.js, nano and CouchDB

Is there a way to change the config parameters in nano after initialization? I'd like to init nano with: nano = require('nano')('http://127.0.0.1:5984') and later change user and password, after a user submits the login form. I always get an…
Patrick
  • 7,903
  • 11
  • 52
  • 87
6
votes
0 answers

Join multiple databases with CouchDB?

Tech being used: Node.js Nano CouchDB Disclaimer: I am very new to CouchDB. I am able to query views with Node.js and Nano just fine. I am looking for more of a conceptual solution then a syntax solution. Scenario: I am building a very basic web…
Phil
  • 10,948
  • 17
  • 69
  • 101
6
votes
1 answer

Updating a CouchDB document in nano

I need to get a document, change/insert/delete some fields and put it back. The "put" action requires the current revision of the document, but in nano I cannot find any function which takes a revision as a parameter and inserts the document back…
DSblizzard
  • 4,007
  • 7
  • 48
  • 76
5
votes
4 answers

Starting with Node.js and CouchDB without libraries like nano or cradle

Possible Duplicate: Getting ' bad_request invalid_json' error when trying to insert document into CouchDB from Node.js The highest voted answer on CouchDB and Node.js - What module do you recommend? recommends not to use libraries such as nano…
DSblizzard
  • 4,007
  • 7
  • 48
  • 76
4
votes
1 answer

Pass session to couchDB using nano

I can not pass the session correctly to CouchDB. Here is my code: var nano = require('nano')({ 'url': 'http://myip:5984' }); var conf = require('./conf'); nano.auth(conf.user.name, conf.user.password, function (err, body, headers) { if…
robert
  • 797
  • 3
  • 9
  • 23
4
votes
1 answer

Using nano.auth correctly

So According to the nano docs here: https://github.com/dscape/nano#using-cookie-authentication, you can authenticate a user via the following: (In coffeescript) nano = require('nano') 'http://localhost:5984' nano.auth username, password I'm fine…
Simeon Cheeseman
  • 1,748
  • 1
  • 13
  • 24
3
votes
2 answers

Update a field of a document in nano module of nodejs for couchdb

Say that there is a couchdb session opened through nano on node.js var dbserv = require('nano')('http://localhost:5984'); At the couchdb server dbserv can access, there is a database users with users that have a field groups that is an array. If I…
Havvy
  • 1,471
  • 14
  • 27
3
votes
1 answer

Require a library with configuration in CoffeeScript?

I'd like to use CoffeeScript with Nano.js, a minimalistic CouchDB module. In JavaScript, the requirements are: var nano = require('nano')('http://127.0.0.1:5984'); However, there is no documentation on how to write this in CoffeeScript? nano =…
Patrick
  • 7,903
  • 11
  • 52
  • 87
3
votes
0 answers

How to post element in existing document couchdb

Hi I want to create a couchdb database of this format where I can add items in the right type of item(Vegetables or Fruits) But I want to know how can I add some products in the catalog with the nano utils of couchdb without erasing the list of…
3
votes
0 answers

How to get details of changed document from _global_changes in CouchDB

I am listening to the changes from all the databases on my CouchDB instance using nano in my node.js application to follow the _global_changes database. const globalChanges = nano.use('_global_changes'); const feed = globalChanges.follow({ since:…
Adam D
  • 1,962
  • 2
  • 21
  • 37
3
votes
0 answers

Nano.auth fails when require_valid_user = true

Below is my sample code referring to this doc: https://github.com/dscape/nano#using-cookie-authentication var nano = require('nano')('http://localhost:5984') const username = 'test' const userpass = '123123' const callback = console.log // this…
3
votes
1 answer

Reading data from view using nano

I'm new at node.js and couchdb, so I've been studying and performing some code tests to try to understand how they work. I'm using nano package to work with couchDBs in node.js. I was able to connect to a database and also to insert data into it.…
3
votes
1 answer

How to search by array

I have some documents with the following format: { url: 'some-unique-url', name: 'some-name' } What I need to do is to select the documents which has a specific url by supplying an array which contains the url's which I need to…
Wern Ancheta
  • 22,397
  • 38
  • 100
  • 139
1
2 3
8 9