summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-01-10 13:02:25 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-01-10 13:02:25 +0100
commit65e25154a92ea47384bc540c129288ca9dad96cb (patch)
tree34cb02de4f6e8dc6066e747089564845bcfb1e4e /main.cpp
parentfcaf8ace27d3421a45df7842a8275ebe35a5dbe3 (diff)
Added HTTP::Static for serving static content.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
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 <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>();