Init Commit

This commit is contained in:
Daniel Mason 2025-06-14 19:23:55 +12:00
commit c51b6236f0
Signed by: idanoo
GPG key ID: 387387CDBC02F132
3 changed files with 26 additions and 0 deletions

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# GoCatFacts
Beautiful program. HTTP server. You hit? You get fact. Boom. Default port 80.
```shell
go run main.go
```

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module gitlab.com/idanoo/gocatfacts
go 1.24.4

16
main.go Normal file
View file

@ -0,0 +1,16 @@
package gocatfacts
import "os"
var (
port = "8080"
)
func main() {
// Set custom port if PORT environment variable is set
portOverride := os.Getenv("PORT")
if portOverride != "" {
port = portOverride
}
}