Skip to content

Instantly share code, notes, and snippets.

@maggandalf
Created February 16, 2014 13:12
Show Gist options
  • Save maggandalf/9034003 to your computer and use it in GitHub Desktop.
Save maggandalf/9034003 to your computer and use it in GitHub Desktop.
@Deployment(testable = false)
public static Archive<JavaArchive> createDeployment() {
return ShrinkWrap.create(UndertowHttpHandlerArchive.class).from(new HttpHandler() {
@Override
public void handleRequest(final HttpServerExchange exchange) throws Exception {
exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain");
exchange.getResponseSender().send("Hello World");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment