tomjadams / slinky-demo
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sat Sep 05 20:53:12 -0700 2009 | |
| |
LICENCE | Sat Sep 05 20:53:12 -0700 2009 | |
| |
NOTICE | Sat Sep 05 20:53:12 -0700 2009 | |
| |
README.markdown | Mon Sep 07 04:08:01 -0700 2009 | |
| |
etc/ | Sat Sep 05 20:53:12 -0700 2009 | |
| |
lib/ | Sat Sep 05 21:06:28 -0700 2009 | |
| |
project/ | Sat Sep 12 20:58:38 -0700 2009 | |
| |
slinky-demo.iml | Sat Sep 05 21:09:46 -0700 2009 | |
| |
slinky-demo.ipr | Fri Sep 11 23:20:05 -0700 2009 | |
| |
src/ | Sun Sep 13 05:52:09 -0700 2009 |
README.markdown
Slinky Demo Project
Demonstration project of Slinky, Scalaz's HTTP library.
Setup
- Install sbt: http://simple-build-tool.googlecode.com/
- Pull down dependencies.
$ sbt update
- This demo currently rely on some unpublished artefacts, to get it:
$ # Get sqm: http://github.com/tomjadams/scala-query-migrations/tree/master $ git clone git://github.com/tomjadams/scala-query-migrations.git $ sbt update $ sbt publish-local $ # Get: http://github.com/szeiger/scala-query/tree/scala-2.7 $ git clone git://github.com/szeiger/scala-query.git $ git checkout origin/scala-2.7 $ sbt update $ sbt publish-local
You should be good to go!
Quick run
In one console:
$ sbt run
In another:
$ curl -i http://localhost:8081/api/register -d '{"name":"Slinky Malinky","organisation":"Scattercat"}'
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 109
Server: Jetty(7.0.0.RC2)
{"description" : "Person registration successful.", "name" : "Slinky Malinky", "organisation" : "Scattercat"}
Run tests
$ sbt run # in one console $ sbt test # in another
Deploy
Note. This does not currently work as we use newer Jetty libs. You're welcome to have a crack at fixing it.
Start Jetty
$ sbt jetty-run
Have sbt/Jetty listen for changes & redeploy
$ sbt ~ prepare-webapp
Stop Jetty
$ sbt jetty-stop
