Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Building a MEAN Application Setting Up MongoDB Creating Seed Data

Craig Heslop
Craig Heslop
22,474 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.