String webRoot = getOptionalStringConfig("web_root", "web");
String index = getOptionalStringConfig("index_page", "index.html");
webRootPrefix = webRoot + File.separator;
indexPage = webRootPrefix + index;
server.listen(getOptionalIntConfig("port", 80), getOptionalStringConfig("host", "0.0.0.0"));
}
public void handle(HttpServerRequest req) {
if (req.path.equals("/")) {
req.response.sendFile(indexPage);