 			*/
 			server = new ESP8266WebServer(80);
 			server->on("/list", HTTP_GET, handleFileList);
-			server->on("/edit", HTTP_GET, [](){
-					if(!handleFileRead("/edit.htm")) server->send(404, "text/plain", "FileNotFound");
-					});
+			server->on("/edit", HTTP_GET, []() {
+				if (!handleFileRead("/edit.htm")) server->send(404, "text/plain", "FileNotFound");
+			});
 			server->on("/edit", HTTP_PUT, handleFileCreate);
 			server->on("/edit", HTTP_DELETE, handleFileDelete);
-			server->on("/edit", HTTP_POST, [](){ server->send(200, "text/plain", ""); }, handleFileUpload);
-
-			server->onNotFound([](){
-				if (!handleFileRead(server->uri())) {
-					String message = "File Not Found\n\n";
-					message += "URI: ";
-					message += server->uri();
-					message += "\nMethod: ";
-					message += (server->method() == HTTP_GET)?"GET":"POST";
-					message += "\nArguments: ";
-					message += server->args();
-					message += "\n";
-					for (uint8_t i=0; i<server->args(); i++)
-						message += " " + server->argName(i) + ": " + server->arg(i) + "\n";
-					server->send(404, "text/plain", message);
-				}
+			server->on("/edit", HTTP_POST, []() { server->send(200, "text/plain", ""); }, handleFileUpload);
+			server->on("/save", HTTP_POST, handleSave);
+
+			server->onNotFound(handleNotFound);
+
+			server->on("/all", HTTP_GET, []() {
+				String json = "{";
+				json += "\"heap\":"+String(ESP.getFreeHeap());
+				json += ", \"analog\":"+String(analogRead(A0));
+				json += ", \"gpio\":"+String((uint32_t)(((GPI | GPO) & 0xFFFF) | ((GP16I & 0x01) << 16)));
+				json += "}";
+				server->send(200, "text/json", json);
+				json = String();
 			});
-
-			server->on("/all", HTTP_GET, [](){
-					String json = "{";
-					json += "\"heap\":"+String(ESP.getFreeHeap());
-					json += ", \"analog\":"+String(analogRead(A0));
-					json += ", \"gpio\":"+String((uint32_t)(((GPI | GPO) & 0xFFFF) | ((GP16I & 0x01) << 16)));
-					json += "}";
-					server->send(200, "text/json", json);
-					json = String();
-					});
 
 			server->on("/", handleRoot);
 			server->begin();

ESP8266WebServer *server;
File fsUploadFile;

void handleRoot() {
	server->send(200, "text/plain", "hello from esp8266!");
}

void handleNotFound() {
	String message = "File Not Found\n\n";
	message += "URI: ";
	message += server->uri();
	message += "\nMethod: ";

	message += "\nArguments: ";
	message += server->args();
	message += "\n";
	for (uint8_t i=0; i<server->args(); i++) {
		message += " " + server->argName(i) + ": " + server->arg(i) + "\n";
	}
	server->send(404, "text/plain", message);
}

/* server test end */
