package com.lanyuanxiaoyao.service.forest;

import io.javalin.Javalin;

/**
 * @author lanyuanxiaoyao
 * @date 2024-01-24
 */
@SuppressWarnings("resource")
public class TestServer {
    public static void main(String[] args) {
        Javalin.create()
                .get("/success", ctx -> ctx.status(200).result("Success"))
                .get("/error", ctx -> ctx.status(500).result("Error"))
                .get("/number", ctx -> ctx.status(200).result("-1"))
                .post("/receive_text", ctx -> ctx.status(200).result(ctx.body()))
                .start(8000);
    }
}
