Skip to content

sarthakvs/CodTech-Task1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. Server Started - image

  2. Get all route - image

  3. Get a item - image

  4. Post a item - image

  5. PUT: Update an existing item by ID - image

  6. DELETE: Remove an item by ID - image

  7. PATCH: Update specific fields of an item by ID - image

  8. GET: Search items by name (query parameter) - image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published