Repository navigation
Yumble Architecture & Design
parfei edited this page Apr 12, 2021
·
13 revisions

- How do I use MongoDB?
- The MongoDB
Sessiondocument will expire after 1 week after it has been created, developer can change the expiry from.env'sSESSION_EXPIRY. This is to avoid running out of lobby ids, as we will save a lobby and its data in MongoDB, so users can review it even after the game has ended. - Every-time you restart the app, you can redefine the expiry for
Sessiondocuments via.env'sSESSION_EXPIRY. Therefore, PLEASE change theATLAS_URItotestDatabaseor something similar, as you do not want to be working with the production database when testing. This is because MongoDB synchronously creates/drops indexes, which will block all other operations on the database. - You should be setting
SESSION_EXPIRYin.envto604800, unless you are testing with NOT the production database.