July 2019
Intermediate to advanced
416 pages
10h 6m
English
Working with MongoDB requires us to use something such as the popular Mongoose package. Installing Mongoose requires us to add both the mongoose and @types/mongoose packages:
npm install mongoose @types/mongoose --save-dev
Before we do anything with our database, we need to create a schema to represent the object that we want to save to the database. Unfortunately, this is where things can become a little bit tedious when we are developing applications using MEAN. While the schema superficially represents the model that we created on the Angular side, it is not the same model, so we have to type it in again.
More importantly, this means that if we change our Angular model, we have to regenerate our MongoDB schema to go ...
Read now
Unlock full access