L05: Persistent data
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.
Presentations
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".
Read & Study
Read and study the following.
Check out the "MDN: Express web framework (Node.js/JavaScript)" with different chapters on how to work with Node.js and Express to build a website. In particular, the following chapter might be extra helpful.
As a quick start for NPM package: Mongoose.
As a reference, Mongoose, read the docs.
As a reference, the MongoDB Documentation.