From 65e25154a92ea47384bc540c129288ca9dad96cb Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 10 Jan 2011 13:02:25 +0100 Subject: Added HTTP::Static for serving static content. --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 3c22d24..ec5c0fe 100644 --- a/main.cpp +++ b/main.cpp @@ -5,6 +5,8 @@ #include "httpd.h" #include "telnetd.h" +#include "http_static.h" + #include #include @@ -34,6 +36,10 @@ int main(int argc, char **argv) { httpd.add_handler("files", &foo_handler); + HTTP::Static static_files("static"); + httpd.add_handler("files", static_files); + httpd.add_handler("", static_files); + telnet::Server telnetd(io_service, tcp::endpoint(tcp::v6(), config::vm["audist.telnetd_port"].as())); std::size_t num_threads = config::vm["audist.threads"].as(); -- cgit v1.2.3