This projects provides a starting point for your own spray-server endeavors. There are two branches:
- The
master
branch provides a template for a spray on Jetty application. - The
spray-can
branch provides a template for a spray on spray-can application.
You are currently on the master
branch.
The template application here uses the following dependencies:
- Scala 2.9.1
- Akka 1.3.1
- spray-server 0.9.0
- Jetty 8.1.0
- SBT 0.11.2
Follow these steps to get started:
-
Git-clone this repository.
$ git clone git://github.com/spray/spray-template.git my-project
-
Change directory into your clone:
$ cd my-project
-
Launch SBT:
$ sbt
-
Compile everything and run all tests:
> test
-
Start Jetty:
> container:start
-
Browse to http://localhost:8080/
-
Learn more at http://www.spray.cc/
-
Start hacking on
src/main/scala/com/example/HelloService.scala
Apart from the Scala sources in the src/main/scala
tree the following non-Scala configuration files are important:
src/main/resources/akka.conf
, the combined Akka and spray configuration filesrc/main/resources/logback.xml
, the config file for the SLF4J logging backend "logback" (not required but recommended)src/main/webapp/WEB-INF/web.xml
, the config file for the Jetty instance used by SBTs web plugin