Mu Server quick start

Logo

Mu Server: Java's modern web server

Quick Start

Add one dependency...

<dependency>
    <groupId>io.muserver</groupId>
    <artifactId>mu-server</artifactId>
    <version>2.0.0</version>
</dependency>

...and say hello:

import io.muserver.*;
public class Hello {
    public static void main(String[] args) {
        MuServer server = MuServerBuilder.httpServer()
            .addHandler(Method.GET, "/", (request, response, pathParams) -> {
                response.write("Hello, world");
            })
            .start();
        System.out.println("Started server at " + server.uri());
    }
}

Upgrading to 2.x? See the upgrade notes.

Features

Each release is tested with Java 8, 11, 17 and 21.