package org.wikiwebserver.handler.http.example;

import org.wikiwebserver.core.ConnectionListener;
import org.wikiwebserver.core.ServiceFactory;

public class ExampleHTTPServer {

    public static void main(String[] args) {
        ConnectionListener exampleService = 
            ServiceFactory.createService("ExampleHTTPServer", 8080, null,
                "org.wikiwebserver.handler.http.HTTPHandler",
                "org.wikiwebserver.handler.http.example.ExampleHTTPConfig", false);
        
        ServiceFactory.startService(exampleService);
        
        while (true) {
            exampleService.serviceConnections();
            try { Thread.sleep(1000);
            } catch (InterruptedException ex) {}
        }
    }
}

