Coder Social home page Coder Social logo

mahmudhmh / faculty-managment-system-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

This Faculty Management System is built using Node.js, Express.js, and Mongoose. It allows users to manage students and courses within a faculty.

JavaScript 100.00%

faculty-managment-system-api's Introduction

Faculty Management System

This Faculty Management System is built using Node.js, Express.js, and Mongoose. It allows users to manage students and courses within a faculty. The system provides various functionalities including getting all students, getting a student by ID, adding a new student, deleting a student by ID, getting all courses, getting a course by ID, deleting a course by ID, and adding a new course.

Installation

  1. Clone the repository:

    git clone https://github.com/mahmudhmh/faculty-management-system-api.git
  2. Navigate to the project directory:

    cd faculty-management-system-api
  3. Install dependencies:

    npm install
  4. Set up your MongoDB database.

  5. Rename .env.example to .env and provide the necessary environment variables like DB_URL for your MongoDB connection.

  6. Run the application:

    nodemon server.js

API Endpoints

You can check the API Documentation from the link below.

Students

Get all students

  • GET /api/students
    • Returns a list of all students.

Get student by ID

  • GET /api/students/:id
    • Returns a specific student by ID.

Add new student

  • POST /api/students
    • Adds a new student. Requires JSON payload with student details.

Delete student by ID

  • DELETE /api/students/:id
    • Deletes a student by ID.

Courses

Get all courses

  • GET /api/courses
    • Returns a list of all courses.

Get course by ID

  • GET /api/courses/:id
    • Returns a specific course by ID.

Add new course

  • POST /api/courses
    • Adds a new course. Requires JSON payload with course details.

Delete course by ID

  • DELETE /api/courses/:id
    • Deletes a course by ID.

Example Usage

Get all students

curl http://localhost:1312/api/students

Get student by ID

curl http://localhost:1312/api/students/{id}

Add new student

curl -X POST -H "Content-Type: application/json" -d '{"name": "John Doe", "dept": "OS"}' http://localhost:1312/api/students

Delete student by ID

curl -X DELETE http://localhost:1312/api/students/{id}

Get all courses

curl http://localhost:1312/api/courses

Get course by ID

curl http://localhost:1312/api/courses/{id}

Add new course

curl -X POST -H "Content-Type: application/json" -d '{"courseName": "Computer Science", "grade": "Very Good"}' http://localhost:1312/api/courses

Delete course by ID

curl -X DELETE http://localhost:1312/api/courses/{id}

Contributors

License

This project is licensed under the MIT License.

faculty-managment-system-api's People

Contributors

mahmudhmh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.