created: 2024-05-06 11:03 | updated: 2024-05-06 11:03
pproteinのインストール
https://github.com/kaz/pprotein
ローカルでの準備
import
今回はechoのV4なので下記のようにインポート
// pproteinpprotein "github.com/kaz/pprotein/integration/echov4"
func initializeHandler(c echo.Context) error {
に下記追加
initializeを実行する関数 (DBのinitとか)
// pproteingo func() { if _, err := http.Get("http://localhost:9000/api/group/collect"); err != nil { log.Printf("failed to communicate with pprotein: %v", err) }}()
main関数に下記追加
// pproteinpprotein.EnableDebugHandler(e)
そのままだと、pproteinが見れないので、ポートフォワードしてあげる
サーバでの準備
pproteinをいれる