September 2017
Intermediate to advanced
450 pages
11h 24m
English
It's worth pausing to reflect on how similar our Mongoose model schema configuration, and our model schema inside a client application like our Angular application, are to one another:
var postSchema = new Schema({ title: String, content: String, published: { type: Date, default: Date.now } });
export class BlogPost { constructor( public title: string = "", public content: string = "", public published: Date = new Date(), ) {} }
You may be wondering if there is some logical way to simplify our application to create our model schema once, and simply load it into both places, considering they are both JSON representations of the same object. If a model was simply a collection ...
Read now
Unlock full access