This repository contains the backend code for a RESTful API built using Express.js to manage courses. This API allows you to perform CRUD operations (Create, Read, Update, Delete) on courses, providing a simple way to interact with course data.
Technology Used- ExpressJs, RestAPI
- Create new courses with relevant information.
- Retrieve a list of all courses or specific course details.
- Update course information.
- Delete courses from the database.
-
Clone the repository:
git clone https://github.com/vickytilotia/ExpressJs-RestAPI-Courses-Backend.git
-
Navigate to the project directory:
cd ExpressJs-RestAPI-Courses-Backend
-
Install dependencies:
npm install
-
Start the server:
npm start
-
The API will be accessible at
http://localhost:3000
.
- `GET /api/courses`: Get a list of all courses.
- `GET /api/courses/:id`: Get details of a specific course by ID.
- `POST /api/courses`: Create a new course.
- `PUT /api/courses/:id`: Update details of a specific course by ID.
- `DELETE /api/courses/:id`: Delete a course by ID.
Contributions are welcome! If you find any issues or want to enhance the project, feel free to create a pull request.
- Fork the repository.
- Create a new branch for your feature:
git checkout -b feature-name
. - Commit your changes:
git commit -am 'Add feature'
. - Push to the branch:
git push origin feature-name
. - Submit a pull request.