NAME: SARTHAK SUNDRIYAL
COMPANY: CODTECH IT SOLUTIONS
ID: CT08DS285
DOMAIN: BACKEND WEB DEVELOPMENT
DURATION: DECEMBER 5th, 2024 to JANUARY 5th, 2025
MENTOR: Muzammil Ahmed
Overview of the Projectt
Project Name: Basic RESTful API for Resource Management
Objective: To build a simple yet functional RESTful API that demonstrates the fundamentals of creating, reading, updating, and deleting (CRUD) resources using Express.js. The project aims to provide hands-on experience in API design and routing.
Key Features and Functionalities:
Create Resource:
Users can add new resources using POST requests. The API validates the input before saving the resource. Read Resource:
Retrieve a list of all resources or a specific resource by its ID using GET requests. Update Resource:
Modify existing resource details using PUT requests. Ensures that only valid data is updated. Delete Resource:
Remove a resource from the collection using DELETE requests. Error Handling:
Provides meaningful error messages for invalid or missing data. Technologies Used:
Framework: Express.js (Node.js) Middleware: express.json() for parsing JSON requests Custom error handling middleware Key Activities:
Setup:
Initialize a Node.js project and install Express.js. Configure basic middleware for request parsing. Development:
Implement CRUD routes for managing resources. Add input validation and error handling. Testing:
Test all endpoints using tools like Postman or cURL. Verify proper responses for valid and invalid requests. Documentation:
Provide endpoint details, including methods, URLs, and required/requested parameters. Expected Outcomes:
A functional API demonstrating CRUD operations. Understanding of RESTful principles, routing, and middleware usage. Knowledge of handling HTTP methods and responses.
Output: