Hosting additional web pages
DPE Nano Services can optionally act as web server for arbitrary web pages.
Put the files for the web pages to be served (or the web application) into the wwwroot subfolder of DpeNanoServices, e.g. a file test.html.
Limitations
Many web applications built with single page application frameworks like Angular expect/require to be hosted top level. Therfore you may not put them into a sub folder of wwwroot.
Not recommended for enterprise environments as mixing DpeNanoServices with web applications makes independent maintenance of components more difficult
Recommended for stand-alone use case where you do not want to install a dedicated web server like IIS on your notebook
DAVID web apps verified to work when hosted in sub folders
Content Manager 3.x
Admin 3.x
ROAD Admin/Scheduling and ROAD InstaRecorder 1.4.55 and newer
ContextualAudioEditing (CAE) 2.0.10 and newer
Using hostnames to host multiple web applications
The mechansim/workaround to host various web applications (which insist on being top-level) in sub folders is to use different hostnames
This allows to share the same port for various web applications (and DpeNanoServices itself)
Configure the DNS server to map the wished hostnames to the machine hosting DpeNanoServices
In a stand-alone use-case, adapt the local hosts file
Example 1 using explicit mapping
Copy DPE ContentManager web app to sub folder wwwroot/cm
Copy DPE Admin web app to sub folder wwwroot/admin
Copy ContextualAudoEditing web app to sub folder wwwroot/cae
Use https://mycm/ for ContentManager
Use https://theadmin for Admin
Use https://cae for ContextualAudioEditing
appsettings.json
...
"RouteByHostNameFileProvider": {
"Enabled": true,
"AutoMapFromDotLocalhost": false,
"Mappings": [
{
"Host": "mycm",
"SubFolder": "cm"
},
{
"Host": "theadmin",
"SubFolder": "admin"
},
{
"Host": "cae",
"SubFolder": "cae"
}
]
},
...
Example 2 using auto mapping
Copy DPE ContentManager web app to sub folder wwwroot/cm
Copy DPE Admin web app to sub folder wwwroot/admin
Copy ContextualAudoEditing web app to sub folder wwwroot/cae
Use https://cm.localhost/ for ContentManager
Use https://admin.localhost for Admin
Use https://cae.localhost for ContextualAudioEditing
appsettings.json
...
"RouteByHostNameFileProvider": {
"Enabled": true,
"AutoMapFromDotLocalhost": true
},
...
Where do I find the local hosts file?
Windows: C:\Windows\System32\drivers\etc\hosts
Linux/Mac: /etc/hosts
Example content
...
127.0.0.1 road-admin.localhost
::1 road-admin.localhost
127.0.0.1 road-scheduling.localhost
::1 road-scheduling.localhost
127.0.0.1 instarecorder.localhost
::1 instarecorder.localhost
...