[Issue #9] Hot reload for development #19

Merged
HugoNijhuis merged 2 commits from issue-9-hot-reload into main 2026-01-09 16:34:16 +00:00
Showing only changes of commit 341379c166 - Show all commits

View File

@@ -1,7 +1,6 @@
package host
import (
"bytes"
"compress/gzip"
"fmt"
"io"
@@ -221,18 +220,3 @@ func (d *DevServer) ListenAndServe(addr string) error {
d.logger.Printf("Development server running on http://%s", addr)
return http.ListenAndServe(addr, d)
}
// ResponseWriter wraps http.ResponseWriter to capture the response
type responseWriter struct {
http.ResponseWriter
buf *bytes.Buffer
statusCode int
}
func (rw *responseWriter) WriteHeader(code int) {
rw.statusCode = code
}
func (rw *responseWriter) Write(b []byte) (int, error) {
return rw.buf.Write(b)
}