feat: add initial project layout
This commit is contained in:
20
internal/server/server.go
Normal file
20
internal/server/server.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.dev-null.rocks/alexohneander/distributed-cache/api"
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func Start() {
|
||||
e := echo.New()
|
||||
|
||||
// Routes
|
||||
e.GET("/", func(c echo.Context) error {
|
||||
return c.String(http.StatusOK, "Hello, World!")
|
||||
})
|
||||
e.GET("/api/v1/cache/:id", api.GetItem)
|
||||
|
||||
e.Logger.Fatal(e.Start(":8080"))
|
||||
}
|
Reference in New Issue
Block a user