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

Dependencies:   mbed lwip

main.cpp

Committer:
rolf
Date:
2009-11-20
Revision:
0:949146458785

File content as of revision 0:949146458785:

#include "mbed.h"
#include "SDFileSystem.h"
#include "HTTPServer.h"

HTTPServer http;
LocalFileSystem local("local");
SDFileSystem sd(p5, p6, p7, p13, "sd");

int main(void) {
    http.addHandler(new HTTPRPC());
    http.addHandler(new HTTPFileSystemHandler("/", "/local/"));
    http.addHandler(new HTTPFileSystemHandler("/sdcard", "/sd/"));
    http.bind();

    while(1) {
        http.poll();
    }
}