Created
January 6, 2014 20:56
-
-
Save robwormald/8289686 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.adapters = { | |
default: 'postgresql', | |
postgresql : { | |
//etc | |
}, | |
rest: { | |
module: 'sails-rest', | |
type: 'json', // expected response type (json | string | http) | |
host: 'api.somewhere.io', // api host | |
port: 80, // api port | |
protocol: 'http', // HTTP protocol (http | https) | |
pathname: '/api/v1' // base api path | |
resource: null, // resource path to use (overrides model name) | |
action: null, // action to use for the given resource ([resource]/run) | |
query: {}, // query parameters to provide with all GET requests | |
methods: { // overrides default HTTP methods used for each CRUD action | |
create: 'post', | |
find: 'get', | |
update: 'put', | |
destroy: 'del' | |
}, | |
beforeFormatResult: function(result){return result}, // alter result prior to formatting | |
afterFormatResult: function(result){return result}, // alter result after formatting | |
beforeFormatResults: function(results){return results}, // alter results prior to formatting | |
afterFormatResults: function(results){return results}, // alter results after formatting | |
cache: { // optional cache engine | |
engine : require('someCacheEngine') | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment