it listens and says hello

This commit is contained in:
2026-06-03 11:55:56 -06:00
parent 1dbc0a42d9
commit 9c5698b83d
3 changed files with 177 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package main
import (
"fmt"
"log"
"github.com/gin-gonic/gin"
)
func main() {
router := gin.Default()
router.GET("/hello", func(ctx *gin.Context) {
ctx.String(200, "Ahoy matey!")
})
if err := router.Run(":5180"); err != nil {
log.Fatal("failure to start the server")
}
fmt.Println("listening on port 5180...")
}