Giter VIP home page Giter VIP logo

backbone-couch's People

Contributors

ianshward avatar kkaefer avatar miccolis avatar mikemorris avatar wildintellect avatar willwhite avatar wrynearson avatar yhahn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

backbone-couch's Issues

Cannot read property 'length' or undefined

/*
 * Backbone - CouchBD connection
 */
 var connection = new cradle.Connection('http://localhost', 5984, {
   auth: { username: 'admin', password: 'XXXXXXX' }, 
   cache: true,
   raw: false
 });
 // Create a new backbone-couch handler for a database 'mercado'.
 var couch = require('backbone-couch')(connection, 'mercado');
 // Create database, push default design documents to it and
 // assign sync method to Backbone.
 couch.install(function(err) {
     Backbone.sync = couch('mercado').sync;
 });

/ Users/aldo/Satio/Desarrollo/express/mercado/lib/backbone-couch.js:29
'Content-Length': data.length,
^
T ypeError: Cannot read property 'length' of undefined
at /Users/aldo/Satio/Desarrollo/express/mercado/lib/backbone-couch.js:29:43
at [object Object]. (fs.js:80:5)
at [object Object].emit (events.js:64:17)
at fs.js:819:12

error in usage - README

I think it should be
Backbone.sync = couch.sync('documents');

otherwise couch function doesn't exist.

The test script is not going throught

run: npm test

it has error:

Error: Error: badarg
at /Users/Jackey/Workspace/embarq/node_modules/backbone-couch/test/test.js:9:23
at /Users/Jackey/Workspace/embarq/node_modules/backbone-couch/node_modules/backbone/backbone.js:1137:9
at /Users/Jackey/Workspace/embarq/node_modules/backbone-couch/backbone-couch.js:55:37
at [object Object].callback (/Users/Jackey/Workspace/embarq/node_modules/backbone-couch/couch.js:34:21)
at [object Object]. (/Users/Jackey/Workspace/embarq/node_modules/backbone-couch/node_modules/request/main.js:290:21)
at [object Object].emit (events.js:64:17)
at IncomingMessage. (/Users/Jackey/Workspace/embarq/node_modules/backbone-couch/node_modules/request/main.js:278:54)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.ondata (http.js:1228:22)

This is the output of couchDB:
[info] [<0.19199.2>] 127.0.0.1 - - 'PUT' /backbone_couch_test_custom/%2Fapi%2FNumber%2Ftwo 201
[error] [<0.19200.2>] Badarg error in HTTP request
[info] [<0.19200.2>] Stacktrace: [{erlang,iolist_to_binary,[true]},
{couch_httpd_rewrite,
'-maybe_encode_bindings/1-fun-0-',2},
{lists,foldl,3},
{couch_httpd_rewrite,handle_rewrite_req,3},
{couch_httpd_db,do_db_req,2},
{couch_httpd,handle_request_int,5},
{mochiweb_http,headers,5},
{proc_lib,init_p_do_apply,3}]
[info] [<0.19200.2>] 127.0.0.1 - - 'GET' /backbone_couch_test_custom/_design/backbone/_rewrite/api/Number/? 500

What's the couchDB version that project rely on ? I think the bug is from rewrite handler of couchDB.

backbone-couch.js throws 'undefined is not a function' error

I apologize if this isn't issue-worthy, but I can't figure out anywhere else to ask this question, so I'm creating an issue around it.

I have a small bones app that I'm trying use backbone-couch with, but whenever I call .save(), I get this error:

/vagrant/lgt-tim/node_modules/backbone-couch/backbone-couch.js:88
    if (err) return error(err);
                    ^
TypeError: undefined is not a function

I have no idea why this happens. I basically c/p'ed the code from the readme and nothing seems to be wrong. I've uninstalled and reinstalled. I have couchdb running. I'm out ideas. Help?

bones 2.x support

Currently only works with bones 1.x (#8). Since bones now has a stable 2.x release, add support for bones 2.x.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.