Created
May 15, 2019 14:51
-
-
Save DNAlchemist/8e85ad51d9bd3182692fa2897316c87a to your computer and use it in GitHub Desktop.
Simple ratpack http server
This file contains hidden or 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
@Grab(group='io.ratpack', module='ratpack-groovy', version='1.6.0') | |
import static ratpack.groovy.Groovy.ratpack | |
import ratpack.handling.Handler; | |
import ratpack.handling.Context; | |
import ratpack.form.Form; | |
import ratpack.form.UploadedFile; | |
ratpack { | |
handlers { | |
post("txt") { | |
parse(Form.class).then({ | |
response.status 200 | |
response.send("HELLO") | |
}) | |
} | |
get("health") { render("ok") } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment