mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
28 lines
434 B
Go
28 lines
434 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
"os"
|
|
"os/exec"
|
|
)
|
|
|
|
func main() {
|
|
// spawn an orphaned zombie
|
|
err := exec.Command("/bin/bash", "-c", "/bin/false &").Run()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
http.HandleFunc("/", hello)
|
|
fmt.Println("listening...")
|
|
err = http.ListenAndServe(":"+os.Getenv("PORT"), nil)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
func hello(res http.ResponseWriter, req *http.Request) {
|
|
fmt.Fprintln(res, "go")
|
|
}
|