https://github.com/wavefronthq/sample-app-java
https://github.com/wavefronthq/sample-app-java
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wavefronthq/sample-app-java
- Owner: wavefrontHQ
- License: apache-2.0
- Created: 2018-09-28T05:25:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-28T22:32:17.000Z (about 2 years ago)
- Last Synced: 2025-04-11T05:07:09.291Z (about 1 year ago)
- Language: Java
- Size: 215 MB
- Stars: 2
- Watchers: 31
- Forks: 34
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sample-app-java
This is a sample java application called beachshirts which makes cool shirts for beach.
Beachshirts is built with a microservices architecture composed of dropwizard and gRPC frameworks.
### Running Application locally
- Build the application by running `mvn clean install` from the root directory of the project.
- Now run all the services using below commands from root directory of the project.
```
java -jar ./shopping/target/shopping-0.9.0-SNAPSHOT.jar server ./shopping/app.yaml
java -jar ./styling/target/styling-0.9.0-SNAPSHOT.jar server ./styling/app.yaml
java -jar ./printing/target/printing-0.9.0-SNAPSHOT.jar ./printing/app.yaml
java -jar ./packaging/target/packaging-0.9.0-SNAPSHOT.jar ./packaging/app.yaml
java -jar ./delivery/target/delivery-0.9.0-SNAPSHOT.jar --spring.config.location=./delivery/src/main/resources/application.yml
```
- Now view the shopping menus using HTTP GET request: `http://localhost:50050/api/shop/menu`
- Order shirts using HTTP POST request:
```
http://localhost:50050/api/shop/order
Payload: {"styleName" : "testStyle1","quantity" : 5}
```
- Optionally you can run a load generation script included in the project to generate requests
using the below command from the root directory of the project.
```
java -jar ./loadgen/target/loadgen-0.9.0-SNAPSHOT.jar localhost 50050 2
```