Skip to content

Commit

Permalink
Added memory adapter, set to default
Browse files Browse the repository at this point in the history
  • Loading branch information
mileszim committed Jul 29, 2014
1 parent 99e822a commit cf15b68
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
14 changes: 11 additions & 3 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,27 @@ module.exports = {
* subscriptions exactly where it was when it stopped. Hummingbird
* uses waterline as its ORM.
*
* Currently, the two available adapters are:
* Currently, the available adapters are:
* - 'redis'
* - 'disk'.
* - 'disk'
* - 'memory' (default)
*
* Data saved using the 'disk' adapter is written to .tmp/disk.db,
* and can be erased by running the command 'make clean'.
*/

// Active adapter
adapter: 'disk',
adapter: 'memory',

adapters: {

// Memory
//
// There are no current settings for the memory adapter.
// Please leave this null.
memory: null,


// Disk
//
// There are no current settings for the disk adapter.
Expand Down
10 changes: 10 additions & 0 deletions lib/adapters/memory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Memory Adapter
*/
module.exports = {
adapter: require('sails-memory'),

connection: {
adapter: 'memory'
}
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hummingbird-node",
"version": "0.2.4",
"version": "0.2.5",
"description": "It's whatever you want it to be.",
"main": "app.js",
"scripts": {
Expand Down Expand Up @@ -37,6 +37,7 @@
"fbgraph": "^0.2.10",
"express": "^4.6.1",
"body-parser": "^1.4.3",
"async": "^0.9.0"
"async": "^0.9.0",
"sails-memory": "^0.10.0-rc2"
}
}

0 comments on commit cf15b68

Please sign in to comment.