Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 1015 Bytes

Global adapter config

The adapters configuration object lets you create different global “saved settings” that you can mix and match in your models. The default option indicates which saved setting should be used if a model doesn't have an adapter specified.

Keep in mind that options you define directly in your model definitions will override these settings.

For example, to use the in-memory adapter (for DEVELOPMENT ONLY), first install the module with npm install sails-memory, then define it in adapters.js:

  memory: {
    module: 'sails-memory'

then in your model definition, add adapter: 'memory':

  module.exports = {
     adapter: 'memory',
     attributes: {
       // some attributes

Sails adapters have been written for a variety of popular databases such as MySQL, Postgres and Mongo. You can find a list of supported adapters here.

Jump to Line
Something went wrong with that request. Please try again.