0% found this document useful (0 votes)
3 views3 pages

Objective:: Assignment: Library Management System API Development Total Marks

The assignment requires the development of a RESTful API for a library management system using Node.js and Express.js, focusing on managing book information. Key tasks include setting up the project, creating a static data structure for books, implementing specific API endpoints, and ensuring JSON responses. The submission must include all relevant files and documentation, with a deadline of November 10, 2024, and will be evaluated based on functionality, code quality, and documentation clarity.

Uploaded by

cyber.cover09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Objective:: Assignment: Library Management System API Development Total Marks

The assignment requires the development of a RESTful API for a library management system using Node.js and Express.js, focusing on managing book information. Key tasks include setting up the project, creating a static data structure for books, implementing specific API endpoints, and ensuring JSON responses. The submission must include all relevant files and documentation, with a deadline of November 10, 2024, and will be evaluated based on functionality, code quality, and documentation clarity.

Uploaded by

cyber.cover09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment: Library Management System API Development

Total Marks: 20

Objective:

Your task is to create a simple RESTful API using Node.js and Express.js that manages
information about books in a library. This assignment will help you practice your skills in building
APIs, working with static data, and understanding how to structure your applications.

Assignment Details:

Scenario: Library Management System


You are developing an API for a library that needs to provide information about its books to
clients (like a front-end application or other services). Your API will allow users to retrieve data
about various books in the library.

Requirements:

Project Setup:

1. Initialize a new Node.js project using npm init to create your package.json file. Make
sure to add your project information in the package.json file.
2. Install the Express.js framework to create your API.
3. Install Nodemon to help with automatic server restarts during development.

Static Data Structure:

1. Create a separate file named data.js to define an array of objects representing books in
the library. Each book object should include the following properties:

• id: A unique identifier for the book (number).


• title: The title of the book (string).
• author: The author of the book (string).
• is_available: A boolean indicating whether the book is available for checkout.

2. Use module.exports in data.js to export the books array.


3. Import this array into your index.js file and access the data from there.

API Endpoints:

Implement the following GET endpoints in your API:

1. List of All Books: Retrieve a complete list of all books in the library (e.g., GET
/api/books).
2. List of Available Books: Retrieve a list of all books that are currently available for
checkout (e.g., GET /api/books/available).
3. List of Issued Books: Retrieve a list of books that have been issued to members (e.g.,
GET /api/books/issued).
4. Find Books by Author: Retrieve a list of all books by a specific author (e.g., GET
/api/books?author=AuthorName).

JSON Responses:

Ensure that your API returns responses in JSON format for all endpoints, making it easy for
clients to consume the data.

Using Nodemon:

Set up Nodemon in your project to enable automatic server restarts when you make changes to
your code. This will improve your development experience.

Documentation:

Create a README.md file that explains how to set up and run your project. Include:

• Instructions for installing dependencies.


• How to start the server.
• A list of the API endpoints with examples of requests and responses.

Submission Guidelines:

Submit your assignment on the ODOO portal as a zip file containing the entire project directory,
including:

• index.js: Your main server file.


• data.js: The file containing your static data structure.
• package.json: Your project configuration file.
• README.md: Documentation for your API.

Ensure that your code is well-organized, properly commented, and adheres to best practices.

Due Date:

Your submission must be uploaded by November 10, 2024, at 11:59 PM. Late submissions may
not be accepted.

Evaluation Criteria:

• Functionality: All endpoints must work correctly and return the expected data.
• Code Quality: Code should be clean, well-structured, and properly commented to
enhance readability.
• Documentation: The README file should provide clear instructions on how to run the
project and use the API.

Additional Notes:

This assignment is an opportunity to practice your backend development skills and reinforce
your understanding of API design and implementation. You can test your API endpoints using
Postman to ensure they behave as expected.

Important Note: Copying code from internet resources will result in zero marks.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy