An http server

main
Bel LaPointe 2024-04-11 16:07:39 -06:00
parent 7def101f9e
commit 8b732b196d
3 changed files with 23 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/spoc-bot-vr

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/breel-render/spoc-bot-vr
go 1.22.1

19
main.go Normal file
View File

@ -0,0 +1,19 @@
package main
import (
"fmt"
"net/http"
"os"
)
func main() {
p := os.Getenv("PORT")
if p == "" {
p = "8080"
}
addr := fmt.Sprintf(":%s", p)
if err := http.ListenAndServe(addr, http.HandlerFunc(http.NotFound)); err != nil {
panic(err)
}
}