Eine kleine super Übung zum Kennenlernen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Quitt.java 777B

12345678910111213141516171819202122232425262728293031
  1. import io.javalin.Javalin;
  2. import static io.javalin.plugin.rendering.template.TemplateUtil.model;
  3. public class Quitt {
  4. public static void main(String[] args) {
  5. Javalin app = Javalin.create().start(7000);
  6. app.config.addStaticFiles("/stylesheets");
  7. app.config.addStaticFiles("/components");
  8. app.get("/", ctx -> {
  9. ctx.render("/index.html", model("firstName", "John", "lastName", "Doe"));
  10. });
  11. app.get("/index.html", ctx -> {
  12. ctx.render("/index.html", model("firstName", "John", "lastName", "Doe"));
  13. });
  14. app.get("/balance.html", ctx -> {
  15. ctx.render("/balance.html", model("firstName", "John", "lastName", "Doe"));
  16. });
  17. }
  18. public void get()
  19. {
  20. }
  21. }