Open Viir opened 5 years ago
Instructions found in https://github.com/Viir/Kalmit/commit/d4fe1b3091b304c2434c0cdd3cd74c3c504aaaa9 :
Use the
build-config
command line option to build the configuration from the Elm app files in the current working directory. To make using this option even simpler, provide a default for the process store location. Full command can look like this:dotnet "path/to/PersistentProcess.WebHost.dll" build-config`
The example I found:
dotnet "./../../PersistentProcess.WebHost/bin/Debug/netcoreapp2.2/PersistentProcess.WebHost.dll" build-config --frontend-web-elm-source="elm-app\src\FrontendWeb\Main.elm" --map-source="map.json"
This was sufficient to bring up the web server. This also reused the state from a previous instance, as it reuses the same directory for the process store.
This example already demonstrates how to configure so that requests to paths outside of /api/
are served by sending the frontend HTML document.
A section in the readme to cover this use case would be nice. The scenario is development: I made a small change to my Elm app in local files and want to start the app to test this new version. Optional: How to add a client-side Elm app to serve as a static file. (Example configuration with a blacklist of paths which should not lead to serving the HTML client document).