I'm working on a sails app still under development.
Each time I make a modification in a controller, I need to restart sails with a 'sails lift' command. Hopefully, it can be eased by using 'forever' tool which detect modifications and restart automatically.
But I need to re-log into my application (because the session is lost when restarting ?) which is really not convenient.
Is there any way to keep the user logged when restarting ?
You can install redis locally and use it as a session store for development by installing connect-redis and adding the following lines to config/env/development.js
module.exports = {
session : {
adapter: 'redis'
}
}
This way session data is not stored in memory and are not affected from sails restarts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With