Hacker News new | ask | show | jobs
by xal 5028 days ago
There is actually a way to do this fully in process. I think Rob Pike initially build this, and it's being used in the App Engine framework (or so I hear...).

Code: http://code.google.com/p/rsc/source/browse/#hg%2Fdevweb

2 comments

It looks like he takes the same approach as Revel. From the comments:

    // Devweb is a simple environment for developing a web server.
    // It runs its own web server on the given address and proxies
    // all requests to the http server program named by importpath.
    // It takes care of recompiling and restarting the program as needed.
And, he uses "go build" to build the program:

    out, err := exec.Command("go", "build", "-o", "prox.exe", rootPackage).CombinedOutput()
It appears to do more than Revel does, though -- I will look at it more closely to see what extra it provides. Wish I had seen this before!
Russ Cox, not Rob Pike, built that.

It's not what's used in the App Engine SDK. I believe it was inspired by what we do in the App Engine SDK, though.