Merge branch 'deploy' into 'main'

Remove go webserver

See merge request vato007/website!2
This commit is contained in:
Michael Pivato
2023-08-02 09:27:37 +00:00
2 changed files with 0 additions and 28 deletions

3
go.mod
View File

@@ -1,3 +0,0 @@
module website
go 1.19

25
main.go
View File

@@ -1,25 +0,0 @@
package main
import (
"embed"
_ "embed"
"flag"
"fmt"
"log"
"net/http"
)
//go:embed site.css node_modules/@picocss/pico/css/pico.min.css index.html
var static embed.FS
func main() {
var port int
flag.IntVar(&port, "port", 8080, "Port to listen on")
flag.Parse()
http.Handle("/", http.FileServer(http.FS(static)))
log.Printf("Starting webserver on port %v", port)
http.ListenAndServe(fmt.Sprintf(":%v", port), nil)
}