Twirl complements spray with templating support.
The TwirlSupport trait provides the tiny glue layer required for being able to use twirl templates directly in
spray-routing routes and request building.
Simply mix in the
TwirlSupport trait or
Since spray-httpx only comes with an optional dependency on twirl you still have to add it to your
project yourself. Check the twirl documentation for information on how to do this.
This site, for example, makes use of twirl-templates and TwirlSupport for serving all of its pages.