Graffiti is a Sinatra-inspired Groovy Framework
- by kerry
Playing around with Sinatra the other day and realized I could really use something like this for Groovy. Thus, Graffiti was born. It’s basically a thin wrapper around Jetty. At first, I thought I might write my own server for it (everybody needs to do that once, don’t they?), but decided to invoke the ’simplest thing that could possibly work’ principle.
Here is the requisite ‘Hello World’ example:
import graffiti.*
@Grab('com.goodercode:graffiti:1.0-SNAPSHOT')
@Get('/helloworld')
def hello() {
'Hello World'
}
Graffiti.serve this
The code, plus more documentation is hosted under my github account.