Skip to content

fbw-d09/record-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Task 04 - Mongoose and Seeding

In this task we will introduce Mongoose. Mongoose is an Object Data Modeling (ODM) library for MongoDB and Node.js. It manages relationships between data, provides schema validation, and is used to translate between objects in code and the representation of those objects in MongoDB. We will learn how to setup Mongoose and how to connect it with our app. We will create our user models and schemas and define exactly how a record/user/order object will look. The next step will be to create a feed function that will feed our database with some fake data so we will be able to test all our endpoints straight away after initialising our server.

TODO:

  1. Please set up mongoose in your server.
  2. Create a data schema and a model for our records, users and orders.
  3. Write a seed script using chance that will run everytime we start our project. If the database is empty, it will feed it some records, orders and users.

chance eine Alternative zu faker

chancejs.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published