Do not use vibe default main but instead use an own main function.

This commit is contained in:
Johannes Loher 2017-10-16 02:58:59 +02:00
parent 06e039bb28
commit 7fe60c474b
2 changed files with 4 additions and 7 deletions

View File

@ -14,10 +14,7 @@
"targetPath": "generated",
"configurations": [
{
"name": "executable",
"versions": [
"VibeDefaultMain"
]
"name": "executable"
},
{
"name": "unittest",

View File

@ -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();
}