Open talentlessguy opened 4 years ago
@talentlessguy thanks for the advice, done :)
@agolebiowska btw also instead of launching docker better do this:
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Welcome to my website!")
})
fs := http.FileServer(http.Dir("static/"))
http.Handle("/static/", http.StripPrefix("/static/", fs))
http.ListenAndServe(":8080", nil)
}
and then go run server.go
in Taskfile.yml
I suggest using Taskfile instead of Make, the tool itself is written in Go
And tinygo instead of
GOOS=js go build
because it produces smaller output