CCCPaste

1679db2c94a4e

import io.vertx.core.Vertx;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.net.SocketAddress;

public class Sandbox {
    final private static int PORT_TDG = 8181;
    final private static int PORT_MY = 8080;
    final private static String HOST = "localhost";
    final private static String TOKEN = "9f226286-e0d8-4125-ad43-b123b4e464da";
    final private static String TYPE = "application/json;charset=utf-8";


    public static void main(String[] args) {
        Vertx vertx = Vertx.vertx();
        HttpServer server = vertx.createHttpServer();

        server.requestHandler(request -> {

            // This handler gets called for each request that arrives on the server
            HttpServerResponse response = request.response();
            response.putHeader("content-type", "text/plain");

            // Write to the response and end it
            response.end("Hello World!");
        });

        server.listen(SocketAddress.domainSocketAddress(String.format("%s/%s//api/migrate/graphql", HOST, PORT_MY)));
    }
}