David Wilson
/
DGWWebServer
Web Server with access to local and SD card filesystem
Diff: main.cpp
- Revision:
- 1:2b224ec81465
- Parent:
- 0:fd1cf5929992
--- a/main.cpp Mon Apr 19 05:31:46 2010 +0000 +++ b/main.cpp Mon Apr 19 07:38:13 2010 +0000 @@ -1,6 +1,9 @@ +#include "SDFileSystem.h" + #include "mbed.h" #include "HTTPServer.h" + #include "HTTPRPC.h" #include "HTTPFS.h" #include "HTTPStaticPage.h" @@ -31,17 +34,18 @@ int main(void) { myled1 = 1; - printf("\r\n\n\nWe have ignition - make sure Ethernet is connected!\n\n\n\r"); + printf("\r\n----------------------------------------------------\n\r"); + printf("\r\nWe have ignition - make sure Ethernet is connected!\n\r"); http.addHandler(new HTTPStaticPage("/test.htm", content, strlen(content))); printf("HTTPStaticPage added\n\r"); http.addHandler(new HTTPRPC()); printf("HTTPRPC added\n\r"); http.addHandler(new HTTPFileSystemHandler("/", "/local/")); printf("HTTPFileSystemHandler added for /local/ \n\r"); - http.addHandler(new HTTPFileSystemHandler("/sdcard", "/sd/")); + http.addHandler(new HTTPFileSystemHandler("/sdcard/", "/sd/")); printf("HTTPFileSystemHandler added for /sd/ \n\r"); http.bind(); - printf("\rbind\n\r"); + printf("bind\n\r"); NetServer *net = NetServer::get(); printf("%hhu.%hhu.%hhu.%hhu\n\r", (net->getIPAddr().addr)&0xFF, (net->getIPAddr().addr>>8)&0xFF, (net->getIPAddr().addr>>16)&0xFF, (net->getIPAddr().addr>>24)&0xFF); while (1) {