Tutorials
We recommend starting with either the Maven setup or Gradle setup tutorial, then going through the Basic webapp structure tutorial.
-
Embedded Jetty with request logger
Create a Spark instance with an embedded Jetty server containing a log4j request logger
-
Using Spark with Kotlin
Use Kotlin with Spark to create a simple CRUD REST API.
-
JavaScript todo-list app
Create a modern single page application in Spark and intercooler.js without writing JavaScript.
-
Basic webapp structure
Create a basic Spark application with filters, controllers, authentication, localization, etc.
-
CORS example
How to enable CORS in Spark.
-
Websocket chat app
Use WebSockets in Spark to create a real-time chat app.
-
Deploying to Heroku
Deploy a Spark Hello World application on Heroku!
-
Docker setup
Get started with Spark on Docker
-
Gradle setup
Set up a Spark application using Gradle 2.5 in Eclipse Luna.
-
Maven setup
Set up a Spark project using Maven in IntelliJ IDEA and Eclipse.
Simple/short
-
Building a contact app
Create a full webapp for syncing your contact list, using Spark, Heroku, MongoDB and SRP authentication.
-
Building a Twitter clone
Create a Twitter clone using Spark, Freemarker, Spring, and HSQLDB
-
Video tutorials
Links to video tutorials from learnhowtoprogram.com.
-
Functional testing
Write functional tests for Spark using cucumber.
-
Unit testing
Example approach for Unit testing in Spark.
-
Spark on Raspberry Pi
Use Spark as a webserver on a Raspberry Pi
-
Freemarker template example
Create a HTML view of a blog
-
Database setup (sql2o)
Connect Spark to a database using sql2o
-
Reducing java boilerplate
Use Spark, Lombok and Jackson to create a boilerplate free REST service