This is an extremely simple Spark api.
Its sole purpose is to demonstrate the simplicity of the SparkJava framework. Made even easier to handle being ubered by Gradle.
Have a look at my other repos for more examples...
I'm on a Mac using Homebrew goodness...
- Java 1.8
brew cask install java
- Gradle
brew install gradle
git clone git@github.com:lendmeapound/simple-spark-api.git
cd simple-spark-api.git
gradle build
To run on default port 4567
gradle runJar
Open a browser of your choice and navigate to
I've included a Docker file here I use to run this particular app... rather than copy and past it from my other repo have a look there for how to run it... Channie's docker-files - env-openjdk-gradle
Although if you have experience with docker then the following should be enough...
Build the image...
docker build -t yourname/env-simple-spark-api .
Run the image in the container...
docker run -dp 10023:4567 yourname/env-simple-spark-api
Open a browser of your choice and navigate to