Show HN: Wd-40, a static webserver with automatic hot-reloads
wd-41 is a static web server for web development with hot-reloading, 73.64% test coverage, and easy installation. It automatically refreshes the browser when file changes occur, enhancing development efficiency.
Read original articlewd-41 is a static web server designed for web development that features hot-reloading capabilities, automatically refreshing the web browser when changes are made to the served files. The project boasts a test coverage of 73.64%. To use the server, one can start it with the command `wd-41 s|serve <relative directory>`, which defaults to serving the current directory if no specific directory is provided. Installation can be done via Go with the command `go install github.com/baalimago/wd-41@latest`, or by running a setup script using curl. The architecture of wd-41 involves copying website content to a temporary directory, injecting a `delta-streamer.js` script into HTML files, and hosting the mirrored content. A WebSocket connection is established to monitor the original file system for changes, allowing new files to be mirrored and notifying the browser to reload the page if the current window matches the updated file. This setup enhances the development experience by eliminating the need for manual page refreshes.
- wd-41 is a static web server with hot-reloading features.
- It has a test coverage of 73.64%.
- The server can be started with a simple command and installed via Go or a setup script.
- The architecture includes a temporary directory for mirrored content and WebSocket connections for real-time updates.
- It streamlines the development process by automatically refreshing the browser on file changes.
Related
WhatWeb: Next Generation Web Scanner (2021)
WhatWeb is a web scanner on GitHub by Andrew Horton and Brendan Coles. It identifies websites, web technologies, and CMS. With 1800+ plugins, it offers detailed insights on websites.
rrweb – record and replay debugger for the web
rrweb.io is an open-source web session replay library enabling remote replay of website interactions. It supports user analysis, bug reproduction, demos, and collaboration. Users can sponsor and receive recognition. Trusted by companies with interactive demos available.
Show HN: Compile Erlang to WASM and run as HTTP/incoming-handler
The "erwasm-http" GitHub repository demonstrates compiling Erlang to WebAssembly for HTTP handling. Users need specific tools and dependencies to set up and run the server, with location reporting concerns noted.
Web-check: All-in-one OSINT tool for analysing any website
Web-Check is an open-source intelligence tool for analyzing websites, identifying vulnerabilities, and assessing server architecture. It offers various features and deployment options, promoting community contributions under the MIT License.
1991 WWW-NeXT Implementation
A GitHub repository named "1991-WWW-NeXT-Implementation" mirrors Tim Berners-Lee's original hypertext browser/editor for NeXT computers, facilitating access to the original code and features for browsing and editing.
- Several users compare wd-41 to existing tools like LiveReload and BrowserSync, discussing their preferences and experiences.
- Concerns are raised about the name "wd-41" potentially leading to legal issues with the WD-40 company.
- Questions about the technical implementation of wd-41 arise, including its mirroring capabilities and support for server-side includes (SSI).
- Some commenters note that static web servers have been a well-established solution for many years.
- There is a mix of appreciation for the tool's existence and skepticism about its novelty in the context of existing technologies.
The fact that they make spray lubricants and you have a website re-loader will likely not make any difference to them.
I've tried many simple servers for experimenting with simple static websites (HTML, CSS, JS). I'm currently settled on LiveReload[1] and BrowserSync[2]. LiveReload attaches to other tooling and is more straightforward, while Brower-Sync when looking across a few multiple browsers (out of habit). I'm not particularly fond of tooling that attaches to an IDE, but I like more of the ones that I can pipe with arguments. But then again, I do straightforward stuff these days.
LiveReload should also be easily attachable to a simple `python -m SimpleHTTPServer 8000`.
It's a single file go executable. Supports CORS too. I use it via direnv & nix-shell.
https://gohugo.io/getting-started/usage/#livereload
Also curious about this: "The delta-streamer.js script then checks if the current window origin is the updated file. If so, it reloads the page."
Does that mean it doesn't auto-refresh if dependencies (scripts, stylesheets, etc) are updated? Maybe there's room for improvement here though I'm not sure how I would approach it. Maybe just an option to skip the check would do the job.
1. For the mirroring, are you using something like rsync (with modifications for the web socket script injection) underneath? Also, will the mirroring reflect destructive changes (like rsync's --delete flag), like if a directory or file is deleted in the original content directory?
2. Could you avoid mirroring the content directory, and just directly serve the original content directory, by just simply on-the-fly injecting the relevant script tag in text/html files? (Or, only mirroring those text/html files, and serving the remaining files from the original content directory.)
is this the best the web have to offer in terms of standards to keep one tab with fresh content? i recall some push standard discussions
https://news.ycombinator.com/item?id=41284189
How many times do you feel the need to repeatedly hype this?
Related
WhatWeb: Next Generation Web Scanner (2021)
WhatWeb is a web scanner on GitHub by Andrew Horton and Brendan Coles. It identifies websites, web technologies, and CMS. With 1800+ plugins, it offers detailed insights on websites.
rrweb – record and replay debugger for the web
rrweb.io is an open-source web session replay library enabling remote replay of website interactions. It supports user analysis, bug reproduction, demos, and collaboration. Users can sponsor and receive recognition. Trusted by companies with interactive demos available.
Show HN: Compile Erlang to WASM and run as HTTP/incoming-handler
The "erwasm-http" GitHub repository demonstrates compiling Erlang to WebAssembly for HTTP handling. Users need specific tools and dependencies to set up and run the server, with location reporting concerns noted.
Web-check: All-in-one OSINT tool for analysing any website
Web-Check is an open-source intelligence tool for analyzing websites, identifying vulnerabilities, and assessing server architecture. It offers various features and deployment options, promoting community contributions under the MIT License.
1991 WWW-NeXT Implementation
A GitHub repository named "1991-WWW-NeXT-Implementation" mirrors Tim Berners-Lee's original hypertext browser/editor for NeXT computers, facilitating access to the original code and features for browsing and editing.