Fix run env vars passed in via command line to test locally and updated docs to match.

This commit is contained in:
Travis Reeder
2017-05-30 10:54:34 -07:00
committed by Reed Allman
parent 7b408468fa
commit af918fdfe9
14 changed files with 79 additions and 41 deletions

View File

@@ -162,8 +162,9 @@ func (s *Server) serve(ctx context.Context, c *gin.Context, appName string, foun
var stdout bytes.Buffer // TODO: should limit the size of this, error if gets too big. akin to: https://golang.org/pkg/io/#LimitReader
envVars := map[string]string{
"METHOD": c.Request.Method,
"ROUTE": found.Path,
"METHOD": c.Request.Method,
"APP_NAME": appName,
"ROUTE": found.Path,
"REQUEST_URL": fmt.Sprintf("%v//%v%v", func() string {
if c.Request.TLS == nil {
return "http"