Node.js, Express.js, MongoDB, and Mongoose: Create, Read, Update, and Delete Operations There is a program similar to this assignment given as the last example, CRUD, in the lecture notes for the week that discusses the introduction to MongoDB. Basically, you need to adapt this example program to the data given in this assignment. This program will take more time that previous assignments. So, hopefully you'll start early and you've kept to the schedule in terms of reading the lecture notes. You can use compass if you want to create this database. Or, when your connection string in the model runs it will create the database for you if one does not yet exist. So, ⚫ create a Mongoose model based on the info given below. The index.html page is given in the same folder as these notes. • When you successfully run index.js and instantiate the model, your database is created. • Once the database is created, you need to perfect the addCar route so you can add data using the index.html page. • Once you can add data, you need to next write the display data route. Here is the video on how to get started. click YouTube Program 4 hint video 1 Thane Video Html forms In you db connection string remember to use the loopback address rather than local host. Here is a second video on how it should all work once everything is complete. The video will make more sense if you have examined the CRUD example mentioned above before viewing the video. click YouTube here Video Program 4 hint video 2 Html forms You will need to make sure this file is named index.html, and it needs to be put in your public folder and be displayed when the user types in the default route of localhost:3000. This program does not require nunjucks. We don't need templates here. Requirements for full credit • . • . You need to have mongoDB installed and running to develop this program. The database needs to be named cars4sale. The db name is set up in the connection string in the model used by your program. As you develop this, your project folder needs to have express, body- parser, and mongoose installed. named Car.js, and you will need to require this model in your index.js file. Your Car model needs the following properties for the schema, spelled exactly like this, using the given data types 0 cid: Number, unique 0 year: Number 0 make: String • • 0 model: String о miles: Number 0 price: Number 0 dealer_id: String You need to use static files to serve the provided index.html file for the default route "/". You will need a modules folder that contains a mongoose model HINT: Once more, your first priority should be to set up the ability to add car documents to the database using the index.html page provided above, and then be able to view them. Get this program working one piece at a time rather than typing it all in at once. I strongly recommend getting the model correct, and the show all route and the add-a-car route working first, before adding any code for the remaining tasks. Once you can add documents to the database and display the results, it will be easier to add and troubleshoot the code for the remaining tasks. But if you can't add a document to the database, you certainly cannot troubleshoot how to edit
Node.js, Express.js, MongoDB, and Mongoose: Create, Read, Update, and Delete Operations There is a program similar to this assignment given as the last example, CRUD, in the lecture notes for the week that discusses the introduction to MongoDB. Basically, you need to adapt this example program to the data given in this assignment. This program will take more time that previous assignments. So, hopefully you'll start early and you've kept to the schedule in terms of reading the lecture notes. You can use compass if you want to create this database. Or, when your connection string in the model runs it will create the database for you if one does not yet exist. So, ⚫ create a Mongoose model based on the info given below. The index.html page is given in the same folder as these notes. • When you successfully run index.js and instantiate the model, your database is created. • Once the database is created, you need to perfect the addCar route so you can add data using the index.html page. • Once you can add data, you need to next write the display data route. Here is the video on how to get started. click YouTube Program 4 hint video 1 Thane Video Html forms In you db connection string remember to use the loopback address rather than local host. Here is a second video on how it should all work once everything is complete. The video will make more sense if you have examined the CRUD example mentioned above before viewing the video. click YouTube here Video Program 4 hint video 2 Html forms You will need to make sure this file is named index.html, and it needs to be put in your public folder and be displayed when the user types in the default route of localhost:3000. This program does not require nunjucks. We don't need templates here. Requirements for full credit • . • . You need to have mongoDB installed and running to develop this program. The database needs to be named cars4sale. The db name is set up in the connection string in the model used by your program. As you develop this, your project folder needs to have express, body- parser, and mongoose installed. named Car.js, and you will need to require this model in your index.js file. Your Car model needs the following properties for the schema, spelled exactly like this, using the given data types 0 cid: Number, unique 0 year: Number 0 make: String • • 0 model: String о miles: Number 0 price: Number 0 dealer_id: String You need to use static files to serve the provided index.html file for the default route "/". You will need a modules folder that contains a mongoose model HINT: Once more, your first priority should be to set up the ability to add car documents to the database using the index.html page provided above, and then be able to view them. Get this program working one piece at a time rather than typing it all in at once. I strongly recommend getting the model correct, and the show all route and the add-a-car route working first, before adding any code for the remaining tasks. Once you can add documents to the database and display the results, it will be easier to add and troubleshoot the code for the remaining tasks. But if you can't add a document to the database, you certainly cannot troubleshoot how to edit
Chapter6: Managing Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 6RA
Related questions
Question

Transcribed Image Text:Node.js, Express.js, MongoDB, and Mongoose: Create, Read, Update, and Delete
Operations
There is a program similar to this assignment given as the last example, CRUD,
in the lecture notes for the week that discusses the introduction to MongoDB.
Basically, you need to adapt this example program to the data given in this
assignment.
This program will take more time that previous assignments. So, hopefully you'll
start early and you've kept to the schedule in terms of reading the lecture
notes.
You can use compass if you want to create this database. Or, when your
connection string in the model runs it will create the database for you if one
does not yet exist. So,
⚫ create a Mongoose model based on the info given below. The index.html
page is given in the same folder as these notes.
• When you successfully run index.js and instantiate the model, your
database is created.
• Once the database is created, you need to perfect the addCar route so
you can add data using the index.html page.
• Once you can add data, you need to next write the display data route.
Here is the video on how to get started.
click YouTube
Program 4 hint video 1
Thane
Video
Html forms
In you db connection string remember to use the loopback address rather than
local host.
Here is a second video on how it should all work once everything is complete.
The video will make more sense if you have examined the CRUD example
mentioned above before viewing the video.

Transcribed Image Text:click YouTube
here
Video
Program 4 hint video 2
Html forms
You will need to make sure this file is named index.html, and it needs to be put
in your public folder and be displayed when the user types in the default route
of localhost:3000.
This program does not require nunjucks. We don't need templates here.
Requirements for full credit
•
.
•
.
You need to have mongoDB installed and running to develop this
program. The database needs to be named cars4sale. The db name is set
up in the connection string in the model used by your program.
As you develop this, your project folder needs to have express, body-
parser, and mongoose installed.
named Car.js, and you will need to require this model in your index.js file.
Your Car model needs the following properties for the schema, spelled
exactly like this, using the given data types
0
cid: Number, unique
0 year: Number
0
make: String
•
•
0 model: String
о miles: Number
0 price: Number
0
dealer_id: String
You need to use static files to serve the provided index.html file for the
default route "/".
You will need a modules folder that contains a mongoose model
HINT: Once more, your first priority should be to set up the ability to add car
documents to the database using the index.html page provided above, and then
be able to view them. Get this program working one piece at a time rather than
typing it all in at once. I strongly recommend getting the model correct, and
the show all route and the add-a-car route working first, before adding any
code for the remaining tasks.
Once you can add documents to the database and display the results, it will be
easier to add and troubleshoot the code for the remaining tasks. But if you can't
add a document to the database, you certainly cannot troubleshoot how to edit
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning

Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr