https://github.com/abhijeetsatpute/courselearn
A simple REST api to CRUD on Courses data a/c to queries.
https://github.com/abhijeetsatpute/courselearn
rest-api
Last synced: 9 months ago
JSON representation
A simple REST api to CRUD on Courses data a/c to queries.
- Host: GitHub
- URL: https://github.com/abhijeetsatpute/courselearn
- Owner: abhijeetsatpute
- Created: 2022-08-29T14:42:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-30T04:11:52.000Z (almost 4 years ago)
- Last Synced: 2025-04-06T09:45:59.317Z (over 1 year ago)
- Topics: rest-api
- Language: JavaScript
- Homepage: https://courselearn.herokuapp.com/api-docs
- Size: 165 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CourseLearn
Created a simple REST api with Courses data to be fetched and created with express, node.js and mongoose ODM for mongoDB.
Find the API documentation in swagger.yaml file
or here: https://courselearn.herokuapp.com/api-docs
API example with Node.js, Express and mongodb
## Getting Started
```
npm install
```
## Methods
### Get ALL Courses
```
GET http://localhost/courses
```
### Get single course by id
```
GET http://localhost/course/:id
```
### Create a new Course
```
POST http://localhost/course
Content-Type: application/json
{
"Name": "React.js the complete guide",
"Type": "intermediate",
"Duration": "50",
"Price": "500",
"Mrp": "1500",
"Discount": "30",
"Rating": "4",
"Category": "programming",
"Thumbnail": "https://picsum.photos/200",
"Demo": "https://www.youtube.com/watch?v=TlB_eWDSMt4&t=476s",
"Partner": "google"
}
```
### Update Course
```
PUT http://localhost/course/:id
Content-Type: application/json
{
"Discount": "80",
}
```
### Delete a course
```
DELETE http://localhost/course/:id
Content-Type: application/json
```
## Authors
* **Abhijeet Satpute** - *Developer* - [Abhijeet](https://github.com/abhijeetsatpute)