MCPcopy Index your code
hub / github.com/CSpyridakis/notes / main

Method main

Java/Simple-http-server/SimpleHttpServer.java:12–19  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

10
11public class SimpleHttpServer {
12 public static void main(String[] args) throws IOException {
13 int port = 8080;
14 HttpServer server = HttpServer.create(new InetSocketAddress(port), 0);
15 server.createContext("/", new FileHandler());
16 server.setExecutor(null);
17 server.start();
18 System.out.println("Server started on port " + port);
19 }
20
21 static class FileHandler implements HttpHandler {
22 @Override

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected