-
-
Save jklingsporn/4966ad9c6194cfab65b0 to your computer and use it in GitHub Desktop.
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
@Override | |
public void start() throws Exception { | |
super.start(); | |
router.route("/resources/*").handler(StaticHandler.create("webroot/resources")); | |
router.route().handler(FaviconHandler.create("webroot/favicon.ico")); | |
PebbleTemplateEngine templateEngine = new PebbleTemplateEngine(); | |
TemplateHandler templateHandler = TemplateHandler.create(templateEngine, "webroot/templates","text/html"); | |
router.route("/templates/*").handler(templateHandler); | |
router.route().handler(h->h.reroute("/templates/chat_client.html")); | |
vertx.createHttpServer().requestHandler(router::accept).listen(8080); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment