A simple demo how to use the HTTPServer with an SDCard file system

Dependencies:   mbed lwip

Committer:
rolf
Date:
Fri Nov 20 11:25:04 2009 +0000
Revision:
0:949146458785

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rolf 0:949146458785 1 #include "mbed.h"
rolf 0:949146458785 2 #include "SDFileSystem.h"
rolf 0:949146458785 3 #include "HTTPServer.h"
rolf 0:949146458785 4
rolf 0:949146458785 5 HTTPServer http;
rolf 0:949146458785 6 LocalFileSystem local("local");
rolf 0:949146458785 7 SDFileSystem sd(p5, p6, p7, p13, "sd");
rolf 0:949146458785 8
rolf 0:949146458785 9 int main(void) {
rolf 0:949146458785 10 http.addHandler(new HTTPRPC());
rolf 0:949146458785 11 http.addHandler(new HTTPFileSystemHandler("/", "/local/"));
rolf 0:949146458785 12 http.addHandler(new HTTPFileSystemHandler("/sdcard", "/sd/"));
rolf 0:949146458785 13 http.bind();
rolf 0:949146458785 14
rolf 0:949146458785 15 while(1) {
rolf 0:949146458785 16 http.poll();
rolf 0:949146458785 17 }
rolf 0:949146458785 18 }