A basic Go program that responds to requests with an environment variable templated into the response.
-
Build and/or run
go build main.go ./main
or
go run main.go
docker build -t hello-world .
docker run -e "ENV=production" --rm -p 8080:8080 hello-world
Visit localhost:8080/hello
to see the response.
For example:
Hello! I am running in production