Skip to content

iggydv/yakshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yakshop

Repository containing all the source code for Yakshop, the Tundra's first home-grown webshop for all your yak produce.

Project Kanban Board

Project Kanban Board

Prerequisite

http -> git clone https://github.com/xebia/yakshop-iggydv.git
ssh  -> git clone git@github.com:xebia/yakshop-iggydv.git

Building YakShop locally

This application is a spring-boot application built in Java 11, using maven as dependency and package manager. This application is intended to be executed as a JAR.

In order to build the application the following commands can be used:

mvn clean package

This will download and build all the required project dependencies and package it as a JAR file.

Testing YakShop locally

In order to run all groovy and junit + webmvc tests, the following commands can be used:

mvn verify

Running YakShop locally

To run the application, simply use following command:

java -jar target\yakshop-0.0.1-SNAPSHOT.jar

Building YakShop locally (Docker)

The application can also be executed as a docker container.

In order to build the docker image, the JAR needs to exist first.
To ensure the image can be built, the following commands can be used:

mvn clean package
docker build . -t yakshop

Running YakShop locally (Docker)

To run the application using docker, the following can be used:

docker run -p 8080:8080 -t yakshop

No java, no problem

If you are unable to build the application locally, the docker image can be pulled directly from dockerhub.

docker pull iggydv12/yakshop

to run the container-image use

docker run -p 8080:8080 -t iggydv12/yakshop

YakShop API

Once the application is up and running, the swagger API can be visited at http://localhost:8080/swagger-ui/index.html#/

The purpose of the application is to allow a heard of LabYaks to be loaded into the application via HTTP POST. Once the herd is loaded it can be queried and orders can be placed against the available stock.

Alternatively API endpoints can be accessed using curl commands.

Load new herd:

curl -X 'POST' \
  'http://localhost:8080/yak-shop/load' \
  -H 'accept: */*' \
  -H 'Content-Type: application/xml' \
  -d '<?xml version="1.0" encoding="UTF-8"?>
<herd>
<labyak name="Betty-1" age="4" sex="f"/>
<labyak name="Betty-2" age="8" sex="f"/>
<labyak name="Betty-3" age="9.5" sex="f"/>
</herd>'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published