Giter Club home page Giter Club logo

node-ottoman's Introduction

Node.js ODM for Couchbase

Ottoman is a ODM built for Couchbase and Node.js. It is designed to remove all of the boilerplate neccessary to build Node.js apps with Couchbase.

Build Status

Source - http://github.com/couchbaselabs/node-ottoman

Couchbase Node.js Community - http://couchbase.com/communities/nodejs

Installing

Ottoman is not yet published to npm, to install the in development version directly from GitHub, run:

npm install git+https://github.com/couchbaselabs/node-ottoman.git

Introduction

Building and interacting with models using ottoman is very simple:

var User = Ottoman.model('User', {
  'username': 'string',
  'name': 'string',
  'email': 'string'
}, {
  bucket: new couchbase.Connection({})
});

var test = new User();
test.username = 'brett19';
test.name = 'Brett Lawson';
test.email = '[email protected]';

Ottoman.save(test, function(err) {
  if (err) throw err;

  MyModel.findById(test._id, function(err, obj) {
    if (err) throw err;

    console.log(obj.name);
    // Brett Lawson
  });
});

Documentation

As ottoman is currently in rapid active development, documentation for it is not yet available. A good source of information in the interim should be the test cases which are available in the /test/ directory.

Source Control

The source code is available at https://github.com/couchbaselabs/node-ottoman. Once you have cloned the repository, you may contribute changes by submitting a GitHub Pull Request.

To execute our test suite, run npm test from your checked out root directory.

License

Copyright 2013 Couchbase Inc.

Licensed under the Apache License, Version 2.0.

See the Apache 2.0 license.

node-ottoman's People

Contributors

brett19 avatar

Watchers

 avatar  avatar

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.