Show HN: Running a simple local HTTP server in a web page
github.com
github.com
You first have to host these index.html and sw.js on a regular server (or use the URL in the readme) and then this service will serve a folder of your choice directly from your computer.
This is if you ran your trusty Python server from the CLI, except you did it from the browser, with an unchangeable host:port
The folder will appear to be published from the server that hosts that sw.js file.
I guess no server worker from a file://-url?
Even so, cool project.
[0]: https://developer.mozilla.org/en-US/docs/Web/API/Response
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Service_Wor...
Nice work.
[0]: https://developer.mozilla.org/en-US/docs/Web/API/File_System...
[0]: vscode.dev
https://user-images.githubusercontent.com/1072787/138898490-...