Giter Club home page Giter Club logo

product-store's Introduction

To run the application you must have Docker installed.

In the /docs directory you have the front-end compiled.

In the application directory run the command:

docker-compose up --build

You can also run the application with an in-memory database without the docker. In application.properties change to test and use the command:

./mvnw spring-boot:run
End points:
To add a new order, do a POST by sending a description to:
/purchase
To add a product to an order, do a POST by sending a product details to:
/purchase/add
To delete a product from an order, do a DELETE by sending a product details to:
/purchase/del
To list the order with your products, do a GET to:
/purchase/{ID}
To receive the total order price, do a GET to:
/purchase/{ID}/total
To close the order, do a GET to:
/purchase/{ID}/close?payment={PAYMENT_VALUE}
To calculate a custom order, do a GET by sending a list of products to:
/purchase/{ID}/calc
Example of purchase description POST:
{"description": "Order of client"}
Example of product details POST and DELETE:
{"product_id": 1154, "purchase_id": 1, "quantity": 2}
Example of product list:
[{"id": 1154, "quantity": 2},{"id": 1164, "quantity": 1}]

product-store's People

Contributors

leandroasp avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.