Zwischenstand
This commit is contained in:
parent
4b78ccbbd9
commit
4b19b5b0f3
4 changed files with 77 additions and 2 deletions
|
@ -6,7 +6,7 @@ import com.sun.net.httpserver.*;
|
|||
import java.net.InetSocketAddress;
|
||||
|
||||
/**
|
||||
* Die Main-Klasse mit dem Einstiegspunkt der Anwendung
|
||||
* Die Main-Klasse mit dem Einstiegspunkt der Anwendung.
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
|
@ -17,7 +17,12 @@ public class Main {
|
|||
public static void main(String[] args) throws Exception {
|
||||
HttpServer s = HttpServer.create(new InetSocketAddress(8000), 0);
|
||||
|
||||
// Kontexts werden nach längstem Matching ausgewählt (wieso?)
|
||||
// Alle unbekannten Anfragen die mit / starten werden also an die RootView gegeben
|
||||
// TODO: Error Handling!!!
|
||||
s.createContext("/", new RootView());
|
||||
s.createContext("/main", new StartView());
|
||||
s.createContext("/auth", new AuthView());
|
||||
|
||||
s.setExecutor(null);
|
||||
s.start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue