Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 1.37 KB

README.md

File metadata and controls

64 lines (45 loc) · 1.37 KB

Course Management API

This API provides a robust solution for managing courses, enabling users to create, read, update, and delete course information.

Installation

With Docker

Click Me
  1. Clone the repository
  2. Use docker-compose to run the server
git clone https://github.com/arshadpatel/codeX100.git
cd codeX100
docker-compose up -d

Without Docker

Click Me
  1. Clone the repository
  2. Install the dependencies
  3. Run the server
git clone https://github.com/arshadpatel/codeX100.git
cd codeX100
cd backend
pnpm install
pnpm dev

NOTE: Setup environment variable in .env from .env.example

Usage

To use the API, you can make HTTP requests to the endpoints provided.

Endpoints:

  • POST /courses: Add a new course (requires name, price, and description).
  • GET /courses: Retrieve a list of available courses.
  • GET /courses/:id: Retrieve details of a specific course.
  • PUT /courses/:id: Update an existing course's details.
  • DELETE /courses/:id: Remove a course from the system.

Validation:

All endpoints ensure proper validation using zod for course data, including name, price, and description, to maintain data integrity.

Contributing

If you would like to contribute, please read our Contributing Guide.