mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
20 lines
382 B
Go
20 lines
382 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
http.HandleFunc("/", hello)
|
|
fmt.Println("hello world")
|
|
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! from Golang on Shipa")
|
|
} |