EquipReserve is a reservation system API that allows users to manage equipment reservations efficiently. This README provides comprehensive information on setting up, running, and using the EquipReserve API.
-
Clone the repository:
git clone https://github.com/abneribeiro/EquipReserve.git cd EquipReserve
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add the following variables:PORT=3000 MONGODB_URI=mongodb://localhost/equipreserve
Modify
MONGODB_URI
based on your MongoDB configuration. -
Run the application:
npm start
EquipReserve API is accessible at http://localhost:3000
by default. You can use tools like Postman or curl to interact with the API.
-
Create a new user:
POST /api/user
-
Get all users:
GET /api/user
-
Get a user by ID:
GET /api/user/:userId
-
Update a user:
PUT /api/user/:userId
-
Delete a user:
DELETE /api/user/:userId
-
Create new equipment:
POST /api/equipment
-
Get all equipment:
GET /api/equipment
-
Get equipment by ID:
GET /api/equipment/:equipmentId
-
Update equipment:
PUT /api/equipment/:equipmentId
-
Delete equipment:
DELETE /api/equipment/:equipmentId
-
Create a new reservation:
POST /api/reservation
-
Get all reservations:
GET /api/reservation
-
Get a reservation by ID:
GET /api/reservation/:reservationId
-
Update a reservation:
PUT /api/reservation/:reservationId
-
Delete a reservation:
DELETE /api/reservation/:reservationId
To run tests using Jest, use the following command:
npm test
- Fork the repository.
- Create a new branch for your feature or fix:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add feature'
. - Push to the branch:
git push origin feature-name
. - Submit a pull request.
This project is licensed under the GNU GENERAL PUBLIC LICENSE.