CouchDB persistence library for Ember.js


2.0.0-pre.195 years ago6 years agoMinified + gzip package size for @ampatspell/ember-cli-sofa in KB



This documentation is also available at http://sofa.amateurinmotion.com

Sofa is full featured and easy to use CouchDB persistence addon for Ember.js.


ember install @ampatspell/ember-cli-sofa


Easiest way to start using sofa, is by extending Store service:

// services/store.js
import { Store } from 'sofa';

const url = '';

const mapping = {
  main: 'awesome-app',
  users: '_users'

export default Store.extend({

  databaseOptionsForIdentifier(identifier) {
    let name = mapping[identifier];
    if(!name) {
    return { url, name };


sofa supports multiple CouchDB hosts and databases (soon also PouchDB). Each database in application is accessed by using identifier. To map identifiers to CouchDB database urls, override databaseOptionsForIdentifier(identifier) and return { url, name } object.

For example, if app queries /awesome-app and /_users CouchDB databases, you can configure Store by using example above to refer to those using main and users identifiers.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.