Permalink
Browse files

Update master

  • Loading branch information...
twoism committed Jul 14, 2012
1 parent a41d472 commit e227c4ebca56f8aed84c724b873be35323e15220
Showing with 32 additions and 39 deletions.
  1. +32 −39 README.markdown
View
@@ -3,6 +3,37 @@
### Description
Finatra is a sinatra clone backed by scala/finagle written by [@capotej](http://twitter.com/capotej) and [@twoism](http://twitter.com/twoism)
+### API
+
+```scala
+class HelloWorld extends Controller {
+
+ def tweets = List(new Tweet("hey!"), new Tweet("lol"))
+
+ get("/cookies") { request =>
+ render.json(request.cookies).header("Content-Type", "text/html")
+ }
+
+ get("/tweets.json") { request =>
+ render.json(tweets)
+ }
+
+ get("/status/:status") { request =>
+ val statusCode = request.params("status").toInt
+
+ render.nothing.status(statusCode)
+ }
+
+ get("/not_found") { request =>
+ render.nothing.notFound
+ }
+
+ get("/headers") { request =>
+ render.nothing.header("X-GitSHA", "1ecd6b1")
+ }
+
+}
+```
### Features
* The routing DSL you've come to know and love
@@ -19,11 +50,6 @@ Finatra is a sinatra clone backed by scala/finagle written by [@capotej](http://
* Mustache template support through [mustache.java](https://github.com/spullara/mustache.java)
-### TODO
-* Make file serving more efficient / Use an LRU map
-
-* Plugin api
-
### Installation via RubyGems
@@ -52,7 +78,7 @@ Finatra is a sinatra clone backed by scala/finagle written by [@capotej](http://
[INFO] launcher 'main' selected => com.twitter.myapp.App
started on 7070: view logs/finatra.log for more info
-## Other Commands
+### Other Commands
$ finatra
Tasks:
@@ -111,39 +137,6 @@ Check out [finatra-helloworld](http://github.com/capotej/finatra-helloworld) for
Here's an [example blog](https://gist.github.com/2626200)
-
-### API
-
-```scala
-class HelloWorld extends Controller {
-
- def tweets = List(new Tweet("hey!"), new Tweet("lol"))
-
- get("/cookies") { request =>
- render.json(request.cookies).header("Content-Type", "text/html")
- }
-
- get("/tweets.json") { request =>
- render.json(tweets)
- }
-
- get("/status/:status") { request =>
- val statusCode = request.params("status").toInt
-
- render.nothing.status(statusCode)
- }
-
- get("/not_found") { request =>
- render.nothing.notFound
- }
-
- get("/headers") { request =>
- render.nothing.header("X-GitSHA", "1ecd6b1")
- }
-
-}
-```
-
### Views
```scala

0 comments on commit e227c4e

Please sign in to comment.