Web Development: JavaScript, CSS, MongoDB Instructions Write a web app that models a user as described below and provide

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Web Development: JavaScript, CSS, MongoDB Instructions Write a web app that models a user as described below and provide

Post by answerhappygod »

Web Development: JavaScript, CSS, MongoDB
Instructions
Write a web app that models a user as described below and
provides the operations listed below. The user collection must be
named users and the database in which the collection is
stored must be named users_db.
User
Here are the properties of a User.
CRUD Operations
Create
A user will be created by sending a GET request for
the path /create.
Request Parameters for Create
Here are the query parameters for the request:
Response Body for Create
The response body will be JSON object for the document created
in MongoDB.
Example
Request:
Note: URLs containing certain special characters such as spaces
need to be encoded. This is called percent-encoding or URL encoding
and was discussed in Module 3 Exploration - HTML Forms. Most
browsers do the encoding for you, so that you can type a URL with
spaces in it and the browser does the necessary encoding when
sending the HTTP request. But in case you use a tool for sending
HTTP request that does not perform percent-encoding, be aware to
this.
Response:
Note that the property "_v" is a version number added by
Mongoose. It is OK to include this property in the response. But
this is your choice and you can also decide to exclude it from the
response.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply