mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-06-01 16:13:10 +00:00
Initial Code Commit
This commit is contained in:
parent
9145b8d1f2
commit
59a15f0957
5 changed files with 91 additions and 0 deletions
19
cmd/server.go
Normal file
19
cmd/server.go
Normal 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"))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue