Initial Code Commit

This commit is contained in:
Michał Gdula 2024-03-15 15:14:21 +00:00
parent 9145b8d1f2
commit 59a15f0957
5 changed files with 91 additions and 0 deletions

19
cmd/server.go Normal file
View file

@ -0,0 +1,19 @@
package cmd
import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
func Serve() {
e := echo.New()
e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.GET("/", func(c echo.Context) error {
return c.String(200, "Hello, World!")
})
e.Logger.Fatal(e.Start(":8080"))
}