Include embed.js in the binary

This commit is contained in:
Daniele Tonon
2023-11-30 11:49:03 +01:00
parent c6d2d4bf6a
commit 9b6f7f5bde
2 changed files with 5 additions and 8 deletions

View File

@@ -7,6 +7,7 @@ import (
func renderEmbedjs(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/javascript")
http.ServeFile(w, r, "templates/embed.js")
return
fileContent, _ := static.ReadFile("static/embed.js")
w.Write(fileContent)
}