Added logging config.
This commit is contained in:
parent
e0edfb8d68
commit
b347cd609e
|
@ -14,3 +14,5 @@ gymboard-uploads-test-*
|
|||
*.o
|
||||
*.obj
|
||||
*.lst
|
||||
|
||||
temp-uploads/
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
import std.stdio;
|
||||
import handy_httpd;
|
||||
import handy_httpd.handlers.path_delegating_handler;
|
||||
import slf4d;
|
||||
import slf4d.default_provider;
|
||||
|
||||
import handlers;
|
||||
|
||||
void main() {
|
||||
// Configure logging
|
||||
auto provider = new shared DefaultProvider(true, Levels.TRACE);
|
||||
configureLoggingProvider(provider);
|
||||
|
||||
PathDelegatingHandler pathHandler = new PathDelegatingHandler();
|
||||
pathHandler.addMapping("GET", "/status", (ref HttpRequestContext ctx) {
|
||||
ctx.response.writeBodyString("online");
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
module handlers;
|
||||
|
||||
import handy_httpd;
|
||||
import handy_httpd.util.range;
|
||||
import slf4d;
|
||||
import std.conv : to;
|
||||
import std.path;
|
||||
|
|
Loading…
Reference in New Issue