https://github.com/dracula27/mongodb_lab1
Per Scholas - Week 8 - Front-end, Express, and MongoDB - Assignment: MongoDB_Lab1
https://github.com/dracula27/mongodb_lab1
css3 express-js git html5 javascript mongodb mongoose
Last synced: 3 months ago
JSON representation
Per Scholas - Week 8 - Front-end, Express, and MongoDB - Assignment: MongoDB_Lab1
- Host: GitHub
- URL: https://github.com/dracula27/mongodb_lab1
- Owner: DrAcula27
- Created: 2023-01-17T21:05:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-20T22:17:44.000Z (over 3 years ago)
- Last Synced: 2025-01-18T05:29:16.215Z (over 1 year ago)
- Topics: css3, express-js, git, html5, javascript, mongodb, mongoose
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Morning Exercise - First Full-Stack Application
## Per Scholas - Week 8 - Front-end, Express, and MongoDB - Assignment: MongoDB_Lab1
1. Add a second Schema/Model File For Vegetables to our app (`veggie.js`).
1. Create the following routes in `server.js`:
1. `/create_veggie` - this route will get information from the front end and create a new Veggie in the MongoDB collection.
1. `/veggies` - this route will get all Veggie objects from the database and send them to the front end.
1. `/veggie/:veggieName` - this route will take the `veggieName` and get that specific veggie from the database and send it to the front end to be displayed.
1. Create the following HTML files:
1. Show all veggies - this page will wait to get the viggie information from the backend (`/veggies`), when it gets the data, will display it on the page.
1. Create new veggie - form to create new veggie.
1. Show single veggie - the JS of this page will make a request to `/veggie/:veggieName` and wait for the response. Will display response on the page.
1. Add 5 Vegetables to a new collection called Veggies (with your HTML form).
1. Make sure all pages work.