Add an embedded web server in own workspace #1007
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Revisiting #982 by putting the new static site serving code into its own Cargo workspace, to avoid increasing build time for the usual blog authors.
Also took @Mark-Simulacrum 's advice from #982 (comment) and added a message at the end of the default running binary to remind the user about ways they might get their hands a preview of the generated web site.
(I did explore
tiny_http
as suggested by @bjorn3 in #982 (comment) , but it took me a lot more code to get a static site up and running, and I wasn't as confident that my prototype would behave well against "unexpected" urls it received)