Created
August 27, 2013 10:29
-
-
Save namuan/6351942 to your computer and use it in GitHub Desktop.
Groovy micro web framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GrabExclude(group='org.eclipse.jetty.orbit', module='javax.servlet', version='3.0.0.v201112011016') | |
@Grapes([ | |
@Grab('org.eclipse.jetty.aggregate:jetty-server:8.1.2.v20120308'), | |
@Grab('org.eclipse.jetty.aggregate:jetty-servlet:8.1.2.v20120308'), | |
@Grab(group='javax.servlet', module='javax.servlet-api', version='3.0.1'), | |
@Grab(group='org.eclipse.jetty', module='jetty-server', version='9.0.4.v20130625'), | |
@Grab(group='com.sparkjava', module='spark-core', version='1.0') | |
]) | |
import static spark.Spark.* | |
import spark.* | |
get(new Route("/hello/:name") { | |
@Override | |
def handle(Request request, Response response) { | |
def name = request.params(":name") | |
return "Hello " + name | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment