This deals with storage and persistant data using Mongoose as a interface to store data in the MongoDB object database. We also deal with Sessions and Flash messages in the website.
This is around the M in MVC, the Model.
Tuesday Zoom with examples
Mikael shows how to get going with Express.js and persistant data and storage.
The recorded videos are found in this playlist on YouTube.
Review this HTML presentation of Persistent Data and Storage).
View it as a lecture in swedish or english.
Swedish with Mats L (Spring 2020):
English with Johan L and Mats L (Autumn 2019). The first video deals with "DB, MongoDB, Mongoose" and the second video deals with "Sessions and Flash Messages".
Here is a repo with the demonstration code on how to get going with mongoose.
Review the 18 minute video on how to store structures in MongoDB.
Read & Study
Read and study the following.
As a quick start for NPM package: Mongoose.
As a reference, Mongoose, read the docs.
- As a reference, the MongoDB Documentation.