Added stuff

This commit is contained in:
joss 2025-04-06 15:36:52 +02:00
parent 9b8ecc8555
commit cd9a49a19a
10 changed files with 96 additions and 12 deletions

View file

@ -15,10 +15,11 @@ public class Main {
* @param args Die Programmargumente
*/
public static void main(String[] args) throws Exception {
HttpServer s = HttpServer.create(new InetSocketAddress(8000), 0);
HttpServer s = HttpServer.create(new InetSocketAddress("127.0.0.1", 8000), 0);
// Kontexts werden nach längstem Matching ausgewählt (wieso?)
// Alle unbekannten Anfragen die mit / starten werden also an die RootView gegeben
// Statische Dateien werden auch von der RootView verarbeitet
// TODO: Error Handling!!!
s.createContext("/", new RootView());
s.createContext("/main", new StartView());