react: add DevEnv utility

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2022-09-05 11:35:09 +02:00
parent 7c3a338748
commit 23370fd04d
Signed by: adphi
GPG Key ID: 46BE4062DB2397FF

View File

@ -57,3 +57,7 @@ func newProxy(endpoint string) (http.Handler, error) {
p := httputil.NewSingleHostReverseProxy(u) p := httputil.NewSingleHostReverseProxy(u)
return p, nil return p, nil
} }
func DevEnv() bool {
return os.Getenv(EndpointEnv) != ""
}