codegangsta / gin

Live reload utility for Go web servers
MIT License
4.23k stars 317 forks source link

Unable to run when binary is on /tmp folder #50

Open kokizzu opened 9 years ago

kokizzu commented 9 years ago

Purpose: reduce write on disk (/tmp is RAM)

Shell script

gin -i -b "/tmp/gin-bin" "go build test.go && ./tmp/gin-bin"

the output

2014/12/10 15:45:16 http: proxy error: dial tcp 127.0.0.1:3001: connection refused
kokizzu commented 9 years ago

Possible workaround:

main.go line 93

    runpath := builder.Binary()
    if runpath[0] != '/' {
        runpath = filepath.Join(wd, runpath)
    }
    runner := gin.NewRunner(runpath, c.Args()...)