Cypress.Cookies.preserveOnce for Cypress v10 example
Uses plugin cypress-v10-preserve-cookie
$ npm install
You will need a MongoDB somewhere and a Redis instance. I assume the MongoDB is running in the cloud and the Redis is running locally in a Docker container.
$ docker-compose up
$ MONGODB=... SESSION_SECRET=... npm start
Tip: use as-a to inject the above environment variables into a local / user profile file .as-a.ini
, something like this:
[chat.io]
SESSION_SECRET=MySecretVariable1234
MONGODB=mongodb://root:rootPass1234@localhost:27017/
$ as-a . npm start
Open the http://localhost:3000 in your browser.