Express 4 Sessions not persisting when restarting server
The default session store for express-session is MemoryStore, which as the name suggests, stores sessions in memory only. If you need persistence, there are many session stores available for Express. Some examples:
- Cookie store
- Redis store
- MongoDB store
- CouchDB store
- Riak store
- memcached store
- leveldb store
- MySQL store
- PostgreSQL store
- Firebase store
For a updated and more complete list visit Compatible Session Stores.