Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created December 10, 2021 04:24
Show Gist options
  • Select an option

  • Save manakuro/887849acbefc2bb531978665b9ac9639 to your computer and use it in GitHub Desktop.

Select an option

Save manakuro/887849acbefc2bb531978665b9ac9639 to your computer and use it in GitHub Desktop.
package main
import (
"golang-clean-architecture-ent-gqlgen/config"
"net/http"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
func main() {
config.ReadConfig(config.ReadConfigOption{})
e := echo.New()
e.Use(middleware.Recover())
e.GET("/", func(c echo.Context) error {
return c.String(http.StatusOK, "Welcome!")
})
e.Logger.Fatal(e.Start(":" + config.C.Server.Address))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment