diff --git a/dub.json b/dub.json index 3db2ce0..ddaf039 100644 --- a/dub.json +++ b/dub.json @@ -14,10 +14,7 @@ "targetPath": "generated", "configurations": [ { - "name": "executable", - "versions": [ - "VibeDefaultMain" - ] + "name": "executable" }, { "name": "unittest", diff --git a/source/calendarwebapp/app.d b/source/calendarwebapp/app.d index d6c35c9..0010348 100644 --- a/source/calendarwebapp/app.d +++ b/source/calendarwebapp/app.d @@ -5,6 +5,7 @@ import calendarwebapp.configuration : Context; import poodinis; +import vibe.core.core : runApplication; import vibe.core.log : logInfo; import vibe.http.fileserver : serveStaticFiles; @@ -12,7 +13,7 @@ import vibe.http.router : URLRouter; import vibe.http.server : HTTPServerSettings, listenHTTP, MemorySessionStore; import vibe.web.web : registerWebInterface; -shared static this() +void main() { auto container = new shared DependencyContainer(); container.registerContext!Context; @@ -26,6 +27,5 @@ shared static this() settings.bindAddresses = ["::1", "127.0.0.1"]; settings.sessionStore = new MemorySessionStore; listenHTTP(settings, router); - - logInfo("Please open http://127.0.0.1:8080/ in your browser."); + runApplication(); }