https://github.com/ammbra/wrapup
Sample project demonstrating Project Amber + Loom latest features.
https://github.com/ammbra/wrapup
jdk22
Last synced: 9 months ago
JSON representation
Sample project demonstrating Project Amber + Loom latest features.
- Host: GitHub
- URL: https://github.com/ammbra/wrapup
- Owner: ammbra
- License: mit
- Created: 2023-11-19T20:19:04.000Z (about 2 years ago)
- Default Branch: jdk22
- Last Pushed: 2024-09-11T06:51:36.000Z (over 1 year ago)
- Last Synced: 2025-04-04T13:08:48.882Z (9 months ago)
- Topics: jdk22
- Language: Java
- Homepage:
- Size: 66.4 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wrapup
This application runs with Java 22.
To start the application use the following command:
```shell
export PATH_TO_JSON=${HOME}/.m2/repository/org/json/json/20231013
java --enable-preview --source 22 -classpath $PATH_TO_JSON/json-20231013.jar src/main/java/org/ammbra/advent/Wrapup.java
```
Now you can try some sample requests:
```shell
curl -X POST http://127.0.0.1:8081 -H 'Content-Type: application/json' -d '{"receiver":"Duke","sender":"Ana","celebration":"CURRENT_YEAR", "option":"NONE"}'
curl -X POST http://127.0.0.1:8081 -H 'Content-Type: application/json' -d '{"receiver":"Duke","sender":"Ana","celebration":"CURRENT_YEAR", "option":"COUPON", "itemPrice": "24.2"}'
curl -X POST http://127.0.0.1:8081 -H 'Content-Type: application/json' -d '{"receiver":"Duke","sender":"Ana","celebration":"BIRTHDAY", "option":"PRESENT", "itemPrice": "27.8", "boxPrice": "2.0"}'
curl -X POST http://127.0.0.1:8081 -H 'Content-Type: application/json' -d '{"receiver":"Duke","sender":"Ana","celebration":"NEW_YEAR", "option":"EXPERIENCE", "itemPrice": "47.5"}'
```