Skip to content

seifhassan89/nestjs-mongodb-crud

Repository files navigation

Student CRUD Web API using NestJS and MongoDB

This is a simple Web API that allows you to perform CRUD (Create, Read, Update, Delete) operations on student records. It is built using the NestJS framework and MongoDB database.

Prerequisites

Before you can run this Web API, you need to have the following installed on your machine:

  • Node.js (version 16 or later)
  • npm (version 8 or later)
  • MongoDB (version 4 or later)

Getting Started

To get started with this Web API, follow these steps:

  1. Clone this repository to your local machine.
  2. Install the required dependencies by running npm install.
  3. Run the application by running npm start.

API Endpoints

This Web API exposes the following endpoints:

GET /students

Get a list of all students.

GET /students/:id

Get a single student by ID.

POST /students

Create a new student record.

PUT /students/:id

Update an existing student record.

DELETE /students/:id

Delete an existing student record.

Contributing

Contributions to this project are welcome! To contribute, follow these steps:

  1. Fork this repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with descriptive commit messages.
  4. Push your changes to your fork.
  5. Create a pull request from your fork to this repository.