Giter VIP home page Giter VIP logo

coex-test-api's Introduction

Dro-ex

This is a very basic REST API made for serving data to the client side of a project made to test and implement new technologies, such as typescript in the backend side.

API Routes


Products Routes:

  • /v1/products
    

    Retrieves a list of all the registered products (Medicines, in this case)

    GET

    [
        {
            "id":            number,
            "name":          string,
            "detail":        string,
            "quantity":      number,
            "admin_route":   string,
            "taxes_pctge":   number,
            "untaxed_price": number,
            "created_at":    Date,
        }
    ]

Sales Routes:

  • /v1/sales
    

    Retrieves a list of all the registered sales

    GET

    [
        {
          "id":             number,
          "untaxed_value":  number,
          "total_value":    number,
          "sold_at":        Date,
        }
    ]

Images Routes:

  • /v1/images/:productId
    

    Retrieves the image associated with a given product ID

    GET

    {
      "id": number,
      "medicine_id": number,
      "image_url": string,
    }

Additional Information


  • The database Script (with populated values) is in the file: /src/sql/database.sql
  • The pool configuration file (for the MySQL connection to the database) is: /src/dbconnection.ts
  • All the app configuration, routes and middlewares are applied inside the App class in the file: /src/app.ts

coex-test-api's People

Contributors

bacaxnot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.