-
Notifications
You must be signed in to change notification settings - Fork 0
WebFramework settings
Semyon Gritsenko edited this page Jan 25, 2022
·
9 revisions
WebFramework uses this list of settings:
in WebServer object:
- ip(default: 0.0.0.0)
- port(default: 80)
- timeout(default: 0) // wait for connection (0 means infinite wait)
in WebFramework object:
- settingsPath[](default: web.json) // contains executors description
- loadSource[](default: current) // array of executors sources(current process, dlls)
- assetsPath(default: assets) // path to folder with files for ResourceExecutor
- usingAssetsCache(default: true) // setting for ResourceExecutor(if ResourceExecutor load asset first time, it holds in cache)
- templatesPath(default: templates) // path to folder with templates for WebFrameworkDynamicPages
- webServerType(default: multiThreaded) // (multiThreaded, threadPool) multi threaded or thread pool server model
- HTTPS object:
- useHTTPS(default: false) // use or not HTTPS
- pathToCertificate // path to cert.pem
- pathToKey // path to key.pem
in Logging object:
- usingLogging(default: true) // initialize logging system
- dateFormat(default: DMY) // every log contains date information(DMY, MDY, YMD)
- addNewLineAfterLog(default: true) // if your log message already has endline symbol you can off this setting
{
"WebServer": {
"ip": "0.0.0.0",
"port": "80",
"timeout": 0
},
"WebFramework": {
"settingsPaths": [
"another.json",
"default.json"
],
"loadSources": [
"current"
],
"assetsPath": "assets",
"templatesPath": "templates",
"usingAssetsCache": true,
"webServerType": "multiThreaded",
"HTTPS": {
"useHTTPS": false,
"pathToCertificate": "certificates/cert.pem",
"pathToKey": "certificates/key.pem"
}
},
"Logging": {
"usingLogging": true,
"dateFormat": "DMY",
"addNewLineAfterLog": true
},
"ThreadPoolServer": {
"threadCount": 0
}
}