Created
August 25, 2015 05:09
-
-
Save joerx/7cc6515c81ccddd683c5 to your computer and use it in GitHub Desktop.
Forcing sails to use memory adapter during tests
This file contains 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
// Occassionally one needs to manually force sails to use the built-in memory adapter as a session store | |
// - for instance when running tests and a mysql-adapter is configured for production, we may need to | |
// override session adapter settings for tests only. Turns out to be pretty simple: | |
Sails.lift({ | |
session: { | |
adapter: 'memory', | |
config: null | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment