Skip to content

Instantly share code, notes, and snippets.

@danveloper
Created November 28, 2016 19:43
Show Gist options
  • Save danveloper/f834a3f13d08938acf38ef2dec5fa4ac to your computer and use it in GitHub Desktop.
Save danveloper/f834a3f13d08938acf38ef2dec5fa4ac to your computer and use it in GitHub Desktop.
  • Create a new folder
  • Create a build.gradle file
  • Inside the build.gradle file, put the following:
buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath 'io.ratpack:ratpack-gradle:1.4.4'
  }
}

apply plugin: 'io.ratpack.ratpack-groovy'

repositories {
  jcenter()
}
  • Create directory structure inside your folder:

    • mkdir -p src/ratpack
  • Create a ratpack.groovy file inside of src/ratpack

  • Put this in there:

import static ratpack.groovy.Groovy.ratpack

ratpack {
  handlers {
    all {
      render "Hello World!"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment