Objective:: Assignment: Library Management System API Development Total Marks
Objective:: Assignment: Library Management System API Development Total Marks
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:
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.
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:
API Endpoints:
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:
Submission Guidelines:
Submit your assignment on the ODOO portal as a zip file containing the entire project directory,
including:
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.