diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-10 13:02:25 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-10 13:02:25 +0100 |
commit | 65e25154a92ea47384bc540c129288ca9dad96cb (patch) | |
tree | 34cb02de4f6e8dc6066e747089564845bcfb1e4e /main.cpp | |
parent | fcaf8ace27d3421a45df7842a8275ebe35a5dbe3 (diff) |
Added HTTP::Static for serving static content.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5,6 +5,8 @@ #include "httpd.h" #include "telnetd.h" +#include "http_static.h" + #include <iostream> #include <vector> @@ -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<int>())); std::size_t num_threads = config::vm["audist.threads"].as<std::size_t>(); |