Merge branch 'no-vibe-default-main' into 'master'
Do not use vibe default main but instead use an own main function. See merge request fsimphy/calendar-webapp!5
This commit is contained in:
commit
bebb5079c4
2 changed files with 4 additions and 7 deletions
5
dub.json
5
dub.json
|
@ -19,10 +19,7 @@
|
|||
"targetPath": "generated",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "executable",
|
||||
"versions": [
|
||||
"VibeDefaultMain"
|
||||
]
|
||||
"name": "executable"
|
||||
},
|
||||
{
|
||||
"name": "unittest",
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue