For Homework you will be writing a node application to practice using Express and Mongoose. Your task: create an app that tracks and stores Restaurants.
Fork and clone this repo. Build out your file structure following MVC and install all the necessary packages from npm.
Build out an app using Express with routes that you can view in your browser and forms that manipulate your data with full CRUD.
Your app should have one resource: Restaurants.
|name||String||The name of the restaurant|
|owner||String||The name of the owner|
|type||String||The type of food the restaurant serves|
|capacity||Number||The max capacity of the restaurant|
Review the documentation on Schemas and Validation in Mongoose and add to your schema definition. Are there default values you could set in the schema? Are there properties you could validate (make required, set a min or max for, etc)?
Bonus 2: Subdocuments
In Mongo, you can create nested resources using Subdocuments. Add a menu property to your Restaurant schema that contains an array of MenuItem documents.