web コンテナの土台を追加(HTTP サーバー、TVer API クライアント、htmx の画面枠、Dockerfile・compose.yaml)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"gitea.kazu634.com/kazu634/tver/internal/web"
|
||||
)
|
||||
|
||||
func main() {
|
||||
address := os.Getenv("WEB_ADDR")
|
||||
if address == "" {
|
||||
address = ":8080"
|
||||
}
|
||||
server := &http.Server{
|
||||
Addr: address,
|
||||
Handler: web.NewHandler(),
|
||||
ReadHeaderTimeout: 5 * time.Second,
|
||||
}
|
||||
log.Printf("web listening on %s", address)
|
||||
log.Fatal(server.ListenAndServe())
|
||||
}
|
||||
Reference in New Issue
Block a user