npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zachwritescode/ottoman

v2.0.1

Published

Ottoman Couchbase ODM

Downloads

3

Readme

CI codecov npm version Commitizen friendly License

Introduction

Ottoman is an ODM built for Couchbase and Node.js.

Ottoman's goal is to provide a better development experience while using Couchbase, bringing to developers a reliable tool to build systems that are easy to design, maintain, and scale.

Installation

npm install ottoman

That's it, you are ready to use Ottoman.

Dependencies Matrix

Supported version are:

| Ottoman | Nodejs | Couchbase SDK | Couchbase Server | ----------- | ----------- | --------------- | ----------------- | ^2.0.0 | ^8.0.0 | ^3.2.2 | ^6.5.0

Notice: make sure you are using supported versions

Getting started

const { connect, model, start, close } = require('ottoman');

const main = async () => {
  await connect("couchbase://localhost/travel-sample@admin:password");

  const User = model('User', { name: String });

  const user = new User({ name: 'Jane Doe' });

  await start();

  await user.save();
  console.log('Nice Job!');

  await close();
}

main();

You should see results similar to the following:

Nice Job!

::: tip Note If you are using legacy database must check out this v1.ottomanjs.com :::

Ottoman v2 main goals

  • To add support to Couchbase SDK 3.
  • To add typescript support.
  • To have a powerful query builder built-in.
  • To allow adding indexes to improve queries performance.
  • To have extendable Schemas using statics, methods, hooks.
  • To have Pluggable Schemas.

Documentation

Checkout our examples and docs for typescript and javascript implementation.

Questions

For questions and support please use the official forum or contact community. Please make sure to read the Issue Reporting Checklist before opening an issue.

Changelog

Detailed changes for each release are documented in the release notes.

Stay In Touch

Contributions

Thank you to all the people who already contributed to Couchbase Ottoman!

Guide for Developers

  1. Install Couchbase Server Using Docker.

::: tip Note Check results on http://localhost:8091/ couchbase web client. :::

  1. Get the repo and install dependencies
$ git clone https://github.com/couchbaselabs/node-ottoman.git
$ cd node-ottoman
$ yarn install
  1. Available scripts
$ yarn dev
$ yarn build
$ yarn lint
$ yarn test
$ yarn test --coverage
$ yarn docs
$ yarn docs:dev

Deploying Ottoman to NPM

  • Pull master branch from repo
  • yarn install
  • ensure version number is bumped
  • yarn build
  • yarn is:ready

Publishing to NPM

When publishing a new package to NPM, please follow the following steps:

  • git pull (master branch)
  • update the package.json file w/ new version
  • yarn install && yarn build
  • yarn test:legacy (Use test:legacy Until CB 7 Release)
  • yarn pack (ensure package is packing as intended)
  • npm publish (--tag alpha or --tag beta)
  • push changes to package.json file w/ new version
  • deploy docs *if required

Once package is published, *update the docs:

  • yarn docs:dev (preview site)
  • yarn docs (generate docs directory)
  • copy files in docs/.vuepress/dist to ottomanjs-site
  • ensure CNAME file is correct
  • git push changes to ottomanjs-site

License

© Copyright 2021 Couchbase Inc.

Licensed under the Apache License, Version 2.0. See the Apache 2.0 license.