21 lines
776 B
Java
21 lines
776 B
Java
package ch.fritteli.labyrinth.server;
|
|
|
|
import ch.fritteli.labyrinth.server.undertow_playground.UndertowPlayground;
|
|
import io.undertow.Undertow;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
@Slf4j
|
|
public class Main {
|
|
public static void main(String[] args) {
|
|
// LabyrinthServer.createAndStartServer()
|
|
// .onEmpty(() -> log.error("Failed to create server. Stopping."));
|
|
|
|
final ServerConfig config = ServerConfig.init();
|
|
log.info("Starting Server at http://{}:{}/", config.getAddress().getHostAddress(), config.getPort());
|
|
Undertow.builder()
|
|
.addHttpListener(config.getPort(), config.getAddress().getHostAddress())
|
|
.setHandler(UndertowPlayground.r)
|
|
.build()
|
|
.start();
|
|
}
|
|
}
|