-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added stand-alone support for Diamond, to be used without vibe.d
- Loading branch information
Showing
9 changed files
with
342 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
module diamond.configurations.serversettings; | ||
|
||
struct ServerSettings { | ||
/// The addresses to bind | ||
string[] bindAddresses; | ||
/// The port to bind | ||
ushort port; | ||
/// Collection of default headers | ||
string[string] defaultHeaders; | ||
version (WebServer) { | ||
version = WebServer_Or_WebService; | ||
} | ||
else version (WebService) { | ||
version = WebServer_Or_WebService; | ||
} | ||
|
||
version (WebServer_Or_WebService) { | ||
struct ServerSettings { | ||
/// The addresses to bind | ||
string[] bindAddresses; | ||
/// The port to bind | ||
ushort port; | ||
/// Collection of default headers | ||
string[string] defaultHeaders; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
module diamond.configurations.sitesettings; | ||
|
||
version (WebServer) { | ||
version (WebService) { | ||
// N/A | ||
} | ||
else { | ||
version = Not_WebService; | ||
} | ||
|
||
version (Not_WebService) { | ||
struct SiteSettings { | ||
/// The name of the web site / web server. | ||
string name; | ||
version (WebServer) { | ||
/// The name of the web site / web server. | ||
string name; | ||
} | ||
|
||
/// Collection of all views | ||
string[string] views; | ||
/// The home route | ||
string homeRoute; | ||
/// The static file route | ||
string staticFileRoute; | ||
|
||
version (WebServer) { | ||
/// The home route | ||
string homeRoute; | ||
/// The static file route | ||
string staticFileRoute; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.