Subscribe Free

Join 2670+ others. No spamming.
I promise!

We are currently under high development. Follow us at github.

Looking for Python Tutorials?
Check these awesome tutorials



What is it?

Graffiti is a lightweight web framework for Groovy inspired by Sinatra

Groovy Start

import graffiti.*

// only required once
def hello() {
    'Hello World!'

// /hello/name?name=You
def helloWhomever() {
    "Hello '${params['name']}'"  

// a sample post
def save() {
    'saved it'

// static files served from here
Graffiti.root 'public'

// we also have to setup what static files to serve
Graffiti.serve '*.css'

// required to process annotations
Graffiti.serve this

// starting web server

Running It

It's super easy!

groovy $YOUR_FILE_NAME.groovy

Implicit Variables

  • application — ServletContext
  • parameters — map of parameters
  • request — HttpServletRequest
  • response — HttpServletResponse
  • session — HttpSession

That's all for now, not sure if or when I will add more features. Feel free to fork it and give it a go!