use of io.javalin.Javalin in project Artemis by mbizhani.
the class TestServer method main.
public static void main(String[] args) {
final Javalin app = Javalin.create().start(8080);
configure(app);
}
use of io.javalin.Javalin in project yardstick by atlarge-research.
the class RemoteControlledExperiment method before.
@Override
protected void before() {
Javalin app = Javalin.create(config -> {
config.defaultContentType = "application/json";
}).routes(() -> {
path("player", () -> {
path("control", () -> {
path("add", () -> get(this::addPlayer));
path("list", () -> get(this::playerList));
});
path("behavior", () -> {
path("command", () -> post(this::giveCommands));
path("status", () -> post(this::getStatus));
});
});
path("stop", () -> get(ctx -> {
this.done = true;
ctx.result("done");
}));
}).start(7000);
app.get("/", ctx -> ctx.result("Hello World"));
}
Aggregations