A RESTful API for managing student information, courses, and enrollments.
- Student management (create, read, update, delete)
- Course management (create, read, update, delete)
- Enrollment management (enroll students in courses, remove enrollments)
- View student enrollments
- View course enrollments
- Backend: Node.js with Express.js
- Database: MongoDB
- Libraries: Mongoose for MongoDB object modeling
GET /api/students
- Get all studentsGET /api/students/:id
- Get a specific studentPOST /api/students
- Create a new studentPUT /api/students/:id
- Update a studentDELETE /api/students/:id
- Delete a studentGET /api/students/:id/enrollments
- Get all enrollments for a student
GET /api/courses
- Get all coursesGET /api/courses/:id
- Get a specific coursePOST /api/courses
- Create a new coursePUT /api/courses/:id
- Update a courseDELETE /api/courses/:id
- Delete a courseGET /api/courses/:id/enrollments
- Get all enrollments for a course
POST /api/enrollments
- Create a new enrollmentDELETE /api/enrollments/:id
- Delete an enrollment
- Clone the repository
- Install dependencies:
npm install
- run mongo container:
docker run -p 27017:27017 -d mongo
- Configure your MongoDB connection in
.env
- Run the server:
npm run dev
- The API will be available at
http://localhost:5000