I am trying to modify this package to include a static HTML file in addition to the existing Rust worker.
The purpose is to add a simple web interface for the worker's API.
I have tried including an index.html file in the src directory. That does not seem to work. The build does not include the HTML file.
The worker currently returns text when you visit '/':
let mut response = router
.get("/", |_, _| Response::ok("POST /encrypt/:round to encrypt to a specfic round on quicknet
POST /decrypt to decrypt
File should be under 10MiB in size"))
I also tried modifying that to read the content from static HTML file:
let mut response = router
.get("/", |_, _| Response::ok(fs::read_to_string("index.html")))
But 1) I cannot get a static file to be included in the build and 2) I get an error saying "operation not supported on this platform".