mirror of
https://github.com/idanoo/GoCatFacts
synced 2025-07-01 06:42:14 +00:00
Init Commit
This commit is contained in:
commit
c51b6236f0
3 changed files with 26 additions and 0 deletions
7
README.md
Normal file
7
README.md
Normal 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
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module gitlab.com/idanoo/gocatfacts
|
||||
|
||||
go 1.24.4
|
16
main.go
Normal file
16
main.go
Normal 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
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue