Search Header Logo
Morgan and Creating Review Endpoint

Morgan and Creating Review Endpoint

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

The video tutorial covers setting up a logging tool called Morgan in a Node.js application to log HTTP requests. It then guides through creating an endpoint for adding product reviews, including associating users with reviews and ensuring users cannot submit multiple reviews for the same product. The tutorial also demonstrates testing the endpoint using Postman, ensuring the backend functionality works as expected.

Read more

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of installing Morgan in the project?

To log HTTP requests in the console

To handle database connections

To manage user authentication

To serve static files

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In which mode is Morgan typically used according to the tutorial?

Development

Staging

Testing

Production

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What additional field is added to the review schema to associate it with a user?

Product ID

Timestamp

User ID

Email

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What HTTP method is used to create a new product review?

DELETE

GET

POST

PUT

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does the system check if a user has already reviewed a product?

By comparing the user's ID with existing reviews

By checking the user's email

By verifying the user's session

By checking the product's stock

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What status code is returned if a user tries to review a product they have already reviewed?

200

201

400

404

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What tool is used to test the review creation endpoint?

Insomnia

Postman

cURL

Swagger

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?