Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created August 19, 2016 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdabir/720bfbc7a60f8646eada8de9815ad391 to your computer and use it in GitHub Desktop.
Save kdabir/720bfbc7a60f8646eada8de9815ad391 to your computer and use it in GitHub Desktop.
Minimal ratpack, runnable and reloadable in GroovyConsole
@Grapes([
@Grab('io.ratpack:ratpack-groovy:1.4.0'),
@Grab('org.slf4j:slf4j-simple:1.7.21')
])
import static ratpack.groovy.Groovy.ratpack
ratpack {
handlers {
get {
render "Hello World!"
}
get(":name") {
render "Hello $pathTokens.name!"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment