Coder Social home page Coder Social logo

apple-market's Introduction

Apple Market Project

This application manages apple bags on the apple market.

How to Run

  • Clone this repository.
  • Make sure you are using JDK 19 and Maven 3.X
  • You can build the project by running mvn clean package
  • NOTE: If maven not installed employ ./mvnw clean package
  • Once successfully built, you can run the service by following command (assuming that you have Maven already instlalled)
     java -jar target/market-0.0.1-SNAPSHOT.jar
or
     mvn spring-boot:run

Once the application runs you should see something like this

2022-11-16 20:44:17.728  INFO 63864 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8081 (http) with context path ''
2022-11-16 20:44:17.737  INFO 63864 --- [           main] c.i.p.market.AppleMarketApplication      : Started AppleMarketApplication in 1.819 seconds (JVM running for 2.128)

About the Service

The service is Apple Market RESTful Api . It is persisted data at the runtime duration.

Here are some endpoints you can call:

1. Get list of apple bags

via Postman


 GET http://localhost:8081/api/bags                  // by default will return 3 bags
 
 
 GET http://localhost:8081/api/bags?numberOfBags=X  // will return X bags
 

or

via Curl

curl -X GET http://localhost:8081/api/bags

2. Add an apple bag

via Postman

 POST http://localhost:8081/api/bags
  {
    "numberOfApples" : 3,
    "supplier": "Royal Gala",
    "price" : 4
  }

or

via Curl

curl -X POST localhost:8081/api/bags -H 'Content-type:application/json' -d '{"numberOfApples":13,"supplier": "Pink Lady","price": 4}'

apple-market's People

Contributors

muratkaymaz56 avatar

Watchers

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