JavaScript Building a MEAN Application Setting Up MongoDB Creating Seed Data

Craig Heslop
Craig Heslop
21,326 Points

What if my data is more complex than that of the example?

What if my schema/data is more complex than that of just an input task and a completed boolean value, i.e first name (String), last name (String) and age (Number).

What would I need to change to make this work with this example?

Thanks

1 Answer

Then you would just specify more SchemaTypes as described in the Mongoose docs. You would still do this in the models/todo.js or equivalent file.