33- [ About this project] ( #About-this-project )
44- [ Development Environment Setup] ( #Development-Environment-Setup )
55- [ Available Endpoints] ( #Available-Endpoints )
6+ - [ Contribution] ( #Contribution )
7+ - [ Licence] ( #Licence )
68
79## About this project
810
@@ -12,10 +14,11 @@ This project is a web application developed using Node.js v16.20.1. It follows t
1214
1315To set up the development environment for this project, follow these steps:
1416
15- - [ Docker File] ( https://hub.docker.com/repository/docker/clamshell6412/ecomerce_res_api/general ) (production only)
16- - Install Node.js v16.20.1 (or a compatible version) on your system.
17- - Clone the project repository from [ repository URL] .
18- - Install project dependencies using npm or yarn. Run npm install or yarn install in the project root directory.
17+ - [ Download Docker Desktop] ( https://www.docker.com/products/docker-desktop/ ) & [ Docker File] ( https://hub.docker.com/repository/docker/clamshell6412/ecomerce_res_api/general ) (production only)
18+
19+ - Or you can just install Node.js [ v16.20.1] ( https://nodejs.org/download/release/latest-gallium/ ) ([ or a compatible version] ( https://nodejs.org/es/download/releases ) ) on your system.
20+ - Clone the project repository using ` git clone https://github.com/yamilt351/api-rest.git `
21+ - Install project dependencies using npm or yarn. Run ` npm install ` or ` yarn install ` in the project root directory.
1922- Configure the environment variables required for the project.
2023
2124```
@@ -31,11 +34,11 @@ PORT=3000
3134```
3235
3336```
34- STRIPE_TOKEN=sk_text_z&&2DbCJa9d3gZkxFwJdE$&hHbRe47KHxAF%&N#qRVx*zVFG$W
37+ STRIPE_TOKEN=sk_text_YourStripeToken
3538
3639```
3740
38- - Start the application using the appropriate command. Run npm run dev or yarn run dev to launch the application.
41+ - Start the application using ` npm run dev ` or ` yarn run dev ` to launch the application.
3942- Access the application in a web browser using the provided URL or port number.
4043
4144# Available Endpoints
@@ -81,28 +84,31 @@ STRIPE_TOKEN=sk_text_z&&2DbCJa9d3gZkxFwJdE$&hHbRe47KHxAF%&N#qRVx*zVFG$W
8184| Edit Status Purchase | ` /api/purchases/status/:purchaseId ` | Put |
8285| Delete Purchase | ` /api/purchases/:purchaseId ` | Delete |
8386
84-
8587[ Postman Documentation] ( https://documenter.getpostman.com/view/21643141/2s93sXcaLf#31c36708-d610-4480-8c8a-628bb32dcfde )
8688
87- | Comments Actions | Routes | Http Verb |
88- | --------------------- | ---------------------- | --------- |
89- | Create Purchase | ` /api/comments/create ` | Post |
90- | Payment | ` /api/comments/getAll ` | Get |
91- | Get Monthly Purchases | ` /api/comments/delete ` | Delete |
89+ | Comments Actions | Routes | Http Verb |
90+ | --------------------- | -------------------------------- | --------- |
91+ | Create Comments | ` /api/comments/create/productId ` | Post |
92+ | Get Products Comments | ` /api/comments/getAll/productId ` | Get |
93+ | Delete Comments | ` /api/comments/delete/commentId ` | Delete |
9294
9395[ Postman Documentation] ( https://documenter.getpostman.com/view/21643141/2s93sXcaLf#31c36708-d610-4480-8c8a-628bb32dcfde )
9496
95- | Responses Actions | Routes | Http Verb |
96- | --------------------- | ------------------------ | --------- |
97- | Create Purchase | ` /api/purchases /create ` | Post |
98- | Payment | ` /api/purchases/payment ` | Get |
99- | Get Monthly Purchases | ` /api/purchases/monthly ` | Delete |
97+ | Responses Actions | Routes | Http Verb |
98+ | ---------------------- | --------- ------------------------ | --------- |
99+ | Create Responses | ` /api/responses /create/commentId ` | Post |
100+ | Get Comments Responses | ` /api/responses/getAll/commentId ` | Get |
101+ | Delete Responses | ` /api/responses/responseId ` | Delete |
100102
101103[ Postman Documentation] ( https://documenter.getpostman.com/view/21643141/2s93sXcaLf#31c36708-d610-4480-8c8a-628bb32dcfde )
102104
103105## Tests
104106
107+ - The aplication was tested with [ Jest] ( https://jestjs.io/ ) and [ Supertest] ( https://www.npmjs.com/package/supertest )
108+
105109```
106110npm run test
107111
108112```
113+
114+ # Contribution.
0 commit comments