Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.3 KB

ReadMe.md

File metadata and controls

36 lines (28 loc) · 1.3 KB

Introduction

This project is a trial of a couple of technologies:

Build and run

To build the project, type gradlew in the root folder. Running it is equally simple: gradlew run. After that, the server is accessible through the following URLs:

Initially, your database (stored as database in folder where you run the project) will be empty. To create a new product, do an HTTP POST like this:

{
	"productName":"Shoe"
}

on the URL http://localhost:8080/products using Content-Type:application/json. This product will be assigned the ID 1. You can GET it from http://localhost:8080/products/1.

To order a pair of shoes, POST the following to http://localhost:8080/orders:

{
   "quantity":2,
   "customerName":"Myself",
   "shippingAddress":"My home",
   "product": "http://localhost:8080/products/1"
}

Hope you enjoy it.