public class Main {
public static void main(String[] args) throws Exception {
TestSetup.setupContext();
SocketServer server = new SocketServer(8080, s -> {
try {
String frontPage = getFrontPage();
String response = makeResponse(frontPage);
s.getOutputStream().write(response.getBytes());
} catch(IOException e) {
e.printStackTrace();
}
});
server.start();
}