This is a RESTful API project built using the Express.js framework and MongoDB. It provides a set of endpoints for managing a collection of "persons" and allows clients to perform CRUD operations on the collection.
GET /person
: Retrieves a list of all persons in the collectionPOST /person
: Creates a new person in the collectionGET /person/:id
: Retrieves a specific person by IDPUT /person/:id
: Updates a specific person by IDDELETE /person/:id
: Deletes a specific person by IDGET /
: Retrieves information about the API
To run this project, you will need Node.js and MongoDB installed on your machine.
- Clone the repository:
git clone https://github.com/GiovanniBot/api-rest-cloud
- Install dependencies:
npm install
- Start the server:
npm run dev
This project uses environment variables to store sensitive information such as the MongoDB connection string. A .env
file is included in the project, you need to set the DB_USER
and DB_PW
environment variables with the correct values.
This project is ready to be deployed to a hosting platform such as Heroku or AWS.
- Express.js - The web framework used
- MongoDB - The database used
- Mongoose - An Object Data Modeling (ODM) library for MongoDB
- MongoDB Atlas - A fully-managed cloud database service for MongoDB, used for hosting and scaling the database in this project.
If you would like to contribute to this project, please submit a pull request with a detailed explanation of your changes.
Giovanni Almeida - Initial work
This project is licensed under the MIT License - see the LICENSE.md file for details.