added go test app
This commit is contained in:
1 parent
e16be6096b
commit
b31ef35ccc
3 files changed
+22
No files matched your search
@@ -0,0 +1 @@
|
||||
go
|
||||
@@ -0,0 +1 @@
|
||||
web: go
|
||||
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
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, "hello, world")
|
||||
}
|
||||
Reference in new issue
Block a user