--- a/src/main/scala/Main.scala Thu Aug 25 15:38:21 2011 -0400
+++ b/src/main/scala/Main.scala Thu Aug 25 15:44:02 2011 -0400
@@ -36,6 +36,11 @@
Ok ~> ContentType("application/xhtml+xml") ~> Scalate(req, "geolocation.ssp")(engine)
}
+ val app = unfiltered.filter.Planify {
+ case req @ Path(Seg("app" :: Nil)) =>
+ Ok ~> ContentType("application/xhtml+xml") ~> Scalate(req, "app.ssp")(engine)
+ }
+
val workoutAPI = unfiltered.filter.Planify {
case req @ POST(Path(Seg("user" :: user :: "workout" :: Nil))) & Host(host) => {
val json:MongoDBObject = com.mongodb.util.JSON.parse(Body.string(req)).asInstanceOf[com.mongodb.DBObject]
@@ -102,7 +107,7 @@
ctx.resources(fromClasspath("scripts/").toURI.toURL)
}.context("/styles"){ ctx:ContextBuilder =>
ctx.resources(fromClasspath("styles/").toURI.toURL)
- }.filter(tracker).filter(workoutAPI).filter(echo).run()
+ }.filter(tracker).filter(app).filter(workoutAPI).filter(echo).run()
}