Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your web service needs to be implemented using the node.js framework. Your web server should use SQLite to connect to a (given) product database, and

Your web service needs to be implemented using the node.js framework. Your web server should use SQLite to connect to a (given) product database, and then allow this database to be manipulated by handling incoming HTTP requests appropriately.

Your web service needs to provide web clients with the following functionality:

  1. to retrieve the full data set (all rows currently stored in your local product inventory database);

    In addition, it should provide the so-called minimal CRUD (Create, Retrieve, Update and Delete) interface on single rows. That is, it should be possible:

  2. to add data for a new product item (Create),
  3. to list the data of a specific item (Retrieve),
  4. to change data of a specific item (Update), and
  5. to remove data of a specific item (Delete);

To realize this functionality, your web service has to allow web developers to manipulate the data in the product inventory over a RESTful HTTP 1.1 API. To be truly RESTful, it needs to meet the following requirements:

  1. The API uses the most appropriate HTTP 1.1 method for each function it provides.
  2. Every HTTP GET method should be guaranteed safe;
  3. except for POST, all other HTTP methods should be idempotent;
  4. in all HTTP responses, the response body is served in the format that is currently most popular under web developers: JSON. Your service should also accept JSON data as input (i.e. to create or update an item), this data should be sent in the request body (and not in the URL query parameters);
  5. all responses deploy the most appropriate HTTP header(s) (including one indicating the appropriate MIME type of the data returned - this should be taken care of by express for you, but check in the response headers this is indeed the case);
  6. all responses deploy the most appropriate HTTP response codes, not only on successful, but also on failed requests.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

How to prepare washing soda from common salt?

Answered: 1 week ago

Question

Explain strong and weak atoms with examples.

Answered: 1 week ago

Question

Explain the alkaline nature of aqueous solution of making soda.

Answered: 1 week ago

Question

Proficiency with Microsoft Word, Excel, PowerPoint

Answered: 1 week ago