Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.19 KB

README.md

File metadata and controls

44 lines (35 loc) · 1.19 KB

Wolt assignment 2024 🚀

This is my solution for Wolt Internship assignment 2024 using Kotlin Spring boot.
Previously I did the same assignment using FastAPI and this time I did it using Kotlin Spring Boot.

How to run

  1. Make sure you have Java 21, docker, Make and Git installed
  2. Clone the repository
  3. Run the following command
    make  // This will build the project using gradle, build the docker image and run the server.
  4. The server will be running on `localhost:8080`
  5. You can test the API using the Postman app or the following curl command
    curl -X POST http://localhost:8080/cart -H "Content-Type: application/json" -d "{\"cart_value\": 720, \"delivery_distance\": 2235, \"number_of_items\": 4, \"time\": \"2024-01-15T13:00:00Z\"}"

    Should return

    {
        "delivery_fee": 780
    }

How to run test units

make test

How to stop

  1. Run the following command
make down // This will stop the server and remove the container
make clean // This will remove the docker image