This is the backend side of Products Web Application.
Thecnologies used to build and run this project.
- Node.js
- Express.js
- Sequelize
- Docker
If you like to run this amazing app in you local machine. These are the steps you should follow:
In order to execute the project, it is necessary the latest version of npm and Node.js. In your machine you need to install docker system.
npm install npm@latest -g
Perfect! Let's clone the repo, and install the dependencies of the project.
- Clone the repo
git clone https://github.com/NousCode/BE-veterinarian-commerce.git
- Install NPM packages
npm install
- Run the docker compose file
docker-compose up -d
- Run the project
npm run dev
Docker provides a different way to use databases without install any DB environment. For this case I use 'Postgres Database' in a docker image service which is being used to persist data in this project.
- API
http://localhost:4000
- Products
- Get all Products:
GET http://localhost:4000/products
- Get a product by id
GET http://localhost:4000/products/${id}
- Add bot
POST http://localhost:4000/products Content-Type: application/json { "name": string, "quantity": number, "store": string, "arehouse": bool }
- Modify a product by id
PUT http://localhost:4000/products/${id} Content-Type: application/json { "name": string, "quantity": number, "store": string, "warehouse": bool }
- Delete a product by id
DELETE http://localhost:4000/products/${id}
- Get all Products:
This project was made with 🛠️ by Juan.