A simple test implementation of a RESTful API for an app-store, built on Spray/Scala/Akka, cloud hosted on Heroku
http://docs.elespuruappstore.apiary.io/
Built with the Spray framework (which in turn rides on Akka)
Why Spray ? I've been wanting to try it and/or Play for a while, and for this Spray made more sense since there was no need for MVC etc that come along with Play. Here's a couple more opinions on why though
http://spray.io/scala.io/
http://blog.michaelhamrah.com/2013/06/scala-web-apis-up-and-running-with-spray-and-akka/
http://www.cakesolutions.net/teamblogs/2013/08/02/akka-and-spray/
Spray 1.2.0:
http://spray.io/
http://spray.io/documentation/1.2.0/
Akka 2.1.4:
http://akka.io/
Evolved from the Spray provided spray-template and examples
https://github.com/spray/spray-template
https://github.com/spray/spray/tree/master/examples/spray-routing/on-spray-can
- Any Git client for the platform you're using
- Download, install Scala: http://www.scala-lang.org/download/
- Download, install SBT: http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html
-
Get the code...
$ git clone https://github.com/elespuru/app-store.git elespuru-app-store
-
Hop in the directory you just cloned from GitHub...
$ cd elespuru-app-store
-
Build the app...
$ sbt
-
Run the test suite...
$ test
-
If all went well, fire it up...
$ re-start
-
Open a browser to...
http://localhost:8080/
-
Or, GET a test application that's bundled already by browsing...
http://localhost:8080/app/1
-
Or, POST to create a new application
% curl --include --header "Content-Type: application/json" \ --request POST \ --data-binary "{ \"name\": \"AppName\", \"description\" : \"Some Really Really Cool App\", \"author\" : \"CoolestApps\", \"price\" : 1.00 }" \ "http://localhost:8080/apps"