NousCode / BE-veterinarian-commerce

It's just a simple ecommerce for a veterinarian.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend API Application

This is the backend side of Products Web Application.

Config-environment

Thecnologies used to build and run this project.

  • Node.js
  • Express.js
  • Sequelize
  • Docker

Getting Started

If you like to run this amazing app in you local machine. These are the steps you should follow:

Prerequisites

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

Installation

Perfect! Let's clone the repo, and install the dependencies of the project.

  1. Clone the repo
    git clone https://github.com/NousCode/BE-veterinarian-commerce.git
  2. Install NPM packages
    npm install 
  3. Run the docker compose file
    docker-compose up -d
  4. Run the project
    npm run dev

Data Persistence

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.

Endpoints Created - Queries

  1. API
    http://localhost:4000
  2. 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}

Data Modeling

Modelo de datos


This project was made with 🛠️ by Juan.

About

It's just a simple ecommerce for a veterinarian.

License:MIT License


Languages

Language:JavaScript 100.0%