Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN: 9781337508841
Author: Carey
Publisher: Cengage
expand_more
expand_more
format_list_bulleted
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 stepSolved in 2 steps

Knowledge Booster
Similar questions
- The implementation of a queue in an array, as given in this chapter, uses the variable count to determine whether the queue is empty or full. You can also use the variable count to return the number of elements in the queue. On the other hand, class linkedQueueType does not use such a variable to keep track of the number of elements in the queue. Redefine the class linkedQueueType by adding the variable count to keep track of the number of elements in the queue. Modify the definitions of the functions addQueue and deleteQueue as necessary. Add the function queueCount to return the number of elements in the queue. Also, write a program to test various operations of the class you defined.arrow_forwardHow is an array stored in main memory? How is a linked list stored in main memory? What are their comparative advantages and disadvantages? Give examples of data that would be best stored as an array and as a linked list.arrow_forwardWhat happens to the existing rows of a table if the DEFAULT value of a column is changed?arrow_forward
- In Chapter 11, you created the most recent version of the MarshallsRevenue program, which prompts the user for customer data for scheduled mural painting. Now, save all the entered data to a file that is closed when data entry is complete and then reopened and read in, allowing the user to view lists of customer orders for mural types.arrow_forwardOpen the Palace Solution.sln file contained in the VB2017\Chap10\Palace Solution folder. Use Windows to copy the Rectangle.vb file from the VB2017\Chap10 folder to the Palace Project folder. Then, use the Add Existing Item option on the Project menu to add the file to the project. Modify the Rectangle class to use Double variables rather than Integer variables. Change the name of the GetArea method to GetAreaSqFt. Add another method to the class. Use Get AreaSqYds as the method’s name. The method should calculate and return the area of a rectangle in square yards. The application’s Calculate button should calculate and display the number of square yards of carpeting needed to carpet a rectangular floor. Code the btnCalc_Click procedure. Display the number of yards with one decimal place. Save the solution and then start and test the application.arrow_forwardWhat happens if you try to decrease the scale or precision of a NUMBER column to a value less than the data already stored in the field?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
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