Move page Handle definition to class constructor

to avoid to setup handle function for web requests in main setup -
define handles function in class creator
This commit is contained in:
luc lebosse
2015-04-18 19:59:22 +08:00
parent c74d8235dd
commit 6365055734
3 changed files with 16 additions and 4 deletions

View File

@@ -75,10 +75,6 @@ void setup() {
//setup wifi according settings
wifi_config.Setup();
delay(1000);
//define interfaces
//TODO move this to class
web_interface.WebServer.on("/", [](){web_interface.WebServer.send(200, "text/plain", "this works as well - port 80");});
data_interface.WebServer.on("/", [](){data_interface.WebServer.send(200, "text/plain", "this works as well - port 8888");});
//start interfaces
web_interface.WebServer.begin();
data_interface.WebServer.begin();