g8 This is a bare bones REST template implemented using the Spray framework on top of Akka. Persistence is handled with MongoDB.
Included sbt-eclipse for generating eclipse project. And sbt-idea for generating IntelliJ project.
Install giter8 (g8) - readme for more information.
Install SBT 0.11.X - Setup for more information.
Install MongoDB - Setup for more information.
In a shell, run the following:
g8 anvie/spray-rest-sbt-0.11.2.g8
cd <name-of-app>
sbt
> update
> container:start
You should be able to browse to a access a JSON body for your resource with 'curl -vv localhost:8080/$resourceName$'
If you see any error like "...must specify akka.mode bla... bla.. bla...", just export AKKA_MODE=dev (for development mode) or specify akka.mode as java parameter.
To create Eclipse project:
$ sbt eclipse
To create IntelliJ Idea project:
$ sbt gen-idea