Skip to content

This is a RESTful API built using Node.js, Express.js, and MongoDB for managing student and course records. It supports CRUD operations to add, retrieve, update, and delete data.

SaadRimeh/-Student-Course-Management-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 

Repository files navigation

πŸ“š Student & Course Management API

This is a RESTful API built using Node.js, Express.js, and MongoDB for managing student and course records. It supports CRUD operations to add, retrieve, update, and delete data.

πŸš€ Overview

  • Master Branch: The production-ready code is on the master branch.
  • Required Environment Variables: To run the project, you'll need to create a .env file with the following keys:
    • MONGO_URL: Your MongoDB connection string. πŸ”—
    • PORT: The port number on which the server will run. (Set this to 5000) πŸ”Œ
    • JWT_SECRET_KEY: A secret key used for authentication with JSON Web Tokens. πŸ”’

🌟 Features

πŸ‘¨β€πŸŽ“ Student Management

  • Register a New Student: Easily add new student records. ✍️
  • Retrieve All Students: Fetch a list of all registered students. πŸ“‹

πŸ“˜ Course Management

  • Add a New Course: Create new course records. βž•
  • Get All Courses: Retrieve a list of all courses. πŸ“š
  • Get a Course by ID: Fetch details of a specific course. πŸ”
  • Update Course Details: Modify information for an existing course. ✏️
  • Delete a Course: Remove a course from the system. πŸ—‘οΈ

πŸ› οΈ Technology Used

  • Node.js: The runtime environment. βš™οΈ
  • Express.js: The web framework for building RESTful APIs. 🌐
  • MongoDB: The NoSQL database for storing records. πŸ’Ύ
  • Mongoose: An ODM for MongoDB that simplifies data manipulation. πŸ”§

πŸ“Š API Endpoints

Endpoint Method Description
/api/students/register POST Register a new student
/api/students GET Retrieve all students
/api/courses POST Add a new course
/api/courses GET Get all courses
/api/courses/:id GET Get a course by its ID
/api/courses/:id PUT Update course information
/api/courses/:id DELETE Delete a course

πŸ”§ Getting Started

  1. Clone the Repository

git clone https://github.com/SaadRimeh/-Student-Course-Management-API.git cd your-repo-name

  1. Install Dependencies

npm install

  1. Configure the Environment

Create a .env file in the root directory and add the following:

env MONGO_URL=your-mongodb-connection-string PORT=5000 JWT_SECRET_KEY=your-secret-key

  1. Run the Application

npm start

The server will start on http://localhost:5000. 🌐

🀝 Contributing

Contributions are welcome! To get started:

  1. Fork the repository. 🍴
  2. Create a new branch for your feature or bug fix. 🌱
  3. Commit your changes. πŸ’Ύ
  4. Open a pull request to merge your changes into the master branch. πŸ”€

Contact

For questions or suggestions, reach out via:

GitHub: SaadRimeh

Email: [email protected]

About

This is a RESTful API built using Node.js, Express.js, and MongoDB for managing student and course records. It supports CRUD operations to add, retrieve, update, and delete data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published