Files
x/main.go
Ian Gulliver 5ceef42bb5 Empty web app
2024-11-24 21:36:03 -06:00

23 lines
299 B
Go

package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
port := os.Getenv("PORT")
if port == "" {
port = "80"
}
bind := fmt.Sprintf(":%s", port)
log.Printf("listening on %s", bind)
if err := http.ListenAndServe(bind, nil); err != nil {
log.Fatalf("listen: %s", err)
}
}