Created
June 30, 2018 17:22
-
-
Save jakelacey2012/48c48e5f54925828bc6b8fe300e2202a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
"github.com/labstack/echo" | |
"github.com/labstack/echo/middleware" | |
) | |
type React struct { | |
path string | |
} | |
type App struct { | |
engine *echo.Echo | |
react *React | |
} | |
func main() { | |
// start graphql server | |
// start client side application | |
// Echo instance | |
e := echo.New() | |
// Middleware | |
e.Use(middleware.Logger()) | |
e.Use(middleware.Recover()) | |
// Routes | |
e.GET("/", hello) | |
// Start server | |
e.Logger.Fatal(e.Start(":1323")) | |
} | |
func hello(c echo.Context) error { | |
return c.String(http.StatusOK, "Hello, World!") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment