Skip to content

Commit

Permalink
/echo を実装
Browse files Browse the repository at this point in the history
  • Loading branch information
tatyam-prime committed Jun 16, 2022
1 parent 912ca2c commit b0e4133
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions router/router.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package router

import (
"fmt"
"net/http"
"os"

Expand All @@ -12,6 +13,10 @@ func SetRouting() {
e.GET("/ping", func(c echo.Context) error {
return c.String(http.StatusOK, "pong")
})
e.GET("/echo", func(c echo.Context) error {
header := fmt.Sprintf("%#v", c.Request().Header)
return c.String(http.StatusOK, header)
})

port := os.Getenv("PORT")
if port == "" {
Expand Down
2 changes: 1 addition & 1 deletion showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ entrypoint: ./main
http_proxy: 3000

https: hard

internal: soft
# cname:
# TODO

Expand Down

0 comments on commit b0e4133

Please sign in to comment.