baremaps-cli/src/main/java/org/apache/baremaps/cli/map/MBTiles.java [86:114]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    var tileJSONSupplier = (Supplier<TileJSON>) () -> tileJSON;

    // Configure the application
    var application =
        new ResourceConfig()
            .register(CorsFilter.class)
            .register(TileResource.class)
            .register(StyleResource.class)
            .register(TilesetResource.class)
            .register(ClassPathResource.class)
            .register(newContextResolver(objectMapper))
            .register(new AbstractBinder() {
              @Override
              protected void configure() {
                bind("assets").to(String.class).named("directory");
                bind("server.html").to(String.class).named("index");
                bind(tileStoreSupplier).to(tileStoreSupplierType);
                bind(styleSupplier).to(styleSupplierType);
                bind(tileJSONSupplier).to(tileJSONSupplierType);
              }
            });

    var httpService = new HttpJerseyRouterBuilder().buildBlockingStreaming(application);
    var serverContext = HttpServers.forPort(port).listenBlockingStreamingAndAwait(httpService);

    logger.info("Listening on {}", serverContext.listenAddress());

    serverContext.awaitShutdown();
    return 0;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Serve.java [88:115]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    var tileJSONSupplier = (Supplier<TileJSON>) () -> tileJSON;

    var application =
        new ResourceConfig()
            .register(CorsFilter.class)
            .register(TileResource.class)
            .register(StyleResource.class)
            .register(TilesetResource.class)
            .register(ClassPathResource.class)
            .register(newContextResolver(objectMapper))
            .register(new AbstractBinder() {
              @Override
              protected void configure() {
                bind("assets").to(String.class).named("directory");
                bind("server.html").to(String.class).named("index");
                bind(tileStoreSupplier).to(tileStoreSupplierType);
                bind(styleSupplier).to(styleSupplierType);
                bind(tileJSONSupplier).to(tileJSONSupplierType);
              }
            });

    var httpService = new HttpJerseyRouterBuilder().buildBlockingStreaming(application);
    var serverContext = HttpServers.forPort(port).listenBlockingStreamingAndAwait(httpService);

    logger.info("Listening on {}", serverContext.listenAddress());

    serverContext.awaitShutdown();
    return 0;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



