Closed chr15m closed 9 years ago
Using Sails.js version 0.10.0 here. In "config/connections.js" (since you have config/adapters, you are using a different version?), specify the adapter "couch":
// CouchDB Adapter couch: { adapter: 'sails-couchdb-orm', host: 'localhost', port: 5984, username: 'myuser', password: 'mypassword' }
And in "models/MyModel.js", put the adapter to be used:
module.exports = { adapter: 'couch', migrate: 'safe', id: { primaryKey: true, type: 'string' }, attributes: { name: 'string', //... } }
Or, you could leave "couch" as the default adapter for all your models, inside "config/models.js", like:
module.exports.models = { connection: 'couch' };
Thanks, great idea.
I'll see what I can do to get this into the README
Using Sails.js version 0.10.0 here. In "config/connections.js" (since you have config/adapters, you are using a different version?), specify the adapter "couch":
And in "models/MyModel.js", put the adapter to be used:
Or, you could leave "couch" as the default adapter for all your models, inside "config/models.js", like: