use of io.helidon.microprofile.server.Server in project helidon by oracle.
the class OidcMain method main.
/**
* Start the application.
* @param args ignored.
*/
public static void main(String[] args) {
Server server = Server.builder().config(buildConfig()).build().start();
System.out.println("http://localhost:" + server.port() + "/test");
}
use of io.helidon.microprofile.server.Server in project helidon by oracle.
the class AbacJerseyMain method startIt.
static Server startIt() {
Config config = Config.create();
Server server = Server.builder().config(config).port(8080).build().start();
System.out.printf("Started server on localhost:%d%n", server.port());
System.out.println();
System.out.println("***********************");
System.out.println("** Endpoints: **");
System.out.println("***********************");
System.out.println("Using declarative authorization (ABAC):");
System.out.printf(" http://localhost:%1$d/rest/attributes%n", server.port());
System.out.println("Using explicit authorization (ABAC):");
System.out.printf(" http://localhost:%1$d/rest/explicit%n", server.port());
return server;
}
use of io.helidon.microprofile.server.Server in project helidon by oracle.
the class Main method main.
/**
* Run this example.
*
* @param args command line arguments (ignored)
*/
public static void main(String[] args) {
long now = System.nanoTime();
Server server = Server.create(StaticContentApp.class, OtherApp.class).start();
now = System.nanoTime() - now;
System.out.println("Start server: " + TimeUnit.MILLISECONDS.convert(now, TimeUnit.NANOSECONDS));
System.out.println("Endpoint available at http://localhost:" + server.port() + "/static/helloworld");
System.out.println("Alternative endpoint (second application) available at http://localhost:" + server.port() + "/other/helloworld");
}
use of io.helidon.microprofile.server.Server in project helidon by oracle.
the class Main method main.
/**
* Application main entry point.
*
* @param args command line arguments
*/
public static void main(final String[] args) {
// load logging configuration
LogConfig.configureRuntime();
Config config = buildConfig();
// as we need to use custom filter
// we need to build Server with custom config
Server server = Server.builder().config(config).build();
server.start();
}
use of io.helidon.microprofile.server.Server in project helidon by oracle.
the class TestCORS method init.
@BeforeAll
static void init() {
Config serverConfig = Config.create().get("server");
Server.Builder serverBuilder = Server.builder();
serverConfig.ifExists(serverBuilder::config);
server = serverBuilder.port(// override the port for testing
-1).build().start();
client = WebClient.builder().baseUri("http://localhost:" + server.port()).addMediaSupport(JSONP_SUPPORT).build();
}
Aggregations