Open tymokvo opened 6 days ago
Running src\fsdocs-tool\bin\Debug\net6.0\fsdocs.exe watch --contenturlroot http://localhost:5001 --port 6001
is not quite working for me. I think we should not allow both settings at the same time.
launching browser window to open http://localhost:6001/
[09:48:03 INF] Smooth! Suave listener started in 8.653ms with binding 127.0.0.1:6001
but leads to
This also makes me wonder if we should go for a breaking change and introduce a --root
flag instead? This would capture both the existing port
and new contenturlroot
flag.
Thoughts @kMutagene @nhirschey?
Yes, I noticed that those parameters could become out of sync. But isn't it possible that both --port
and --contenturlroot
may be desired?
E.g.
watch
server bound to localhost:6001
(overriding the default of 8901
)ngrok
tunnel from dev-a.ngrok.io
to localhost:6001
dev-a.ngrok.io
and hits the suave serverIn this case, the static content should all replace root
with http://dev-a.ngrok.io/
and the suave server should still bind on 6001
, correct?
Summary
watch
flag for injecting a URL root into static site content for non-localhost
browsersif watch
to replace root override with the passed URL rootwindow.location
Description
This adds the ability to serve the generated documentation site to browsers not running on
localhost
. For example, when working in a remote development environment like GitHub Codespaces or anngrok
endpoint.