Skip to content

ocallaghandonal/CoinFlipper

Repository files navigation

Build Status

CoinFlipper

An API built in Kotlin using Ktor and exposed to generate random coin flips.

Build the app using gradle

./gradlew clean jar

Then run the jar

 java -jar build/libs/coin_flipper-1.0-SNAPSHOT.jar 

To flip a coin in the terminal enter

curl localhost:8080/flip
{"face":"HEADS"}

curl localhost:8080/flip
{"face":"TAILS"}

curl localhost:8080/flip
{"face":"HEADS"}

To see the results so far enter

curl localhost:8080/outcomes
[{"face":"HEADS"},{"face":"TAILS"},{"face":"HEADS"}]

Feel free to use your browser or the demo Android app located here

About

A Kotlin API to generate random coin flips

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages