init
This commit is contained in:
parent
2ee9b00258
commit
2118732d78
|
|
@ -0,0 +1,26 @@
|
||||||
|
app = "golang-buildpack-app-sample"
|
||||||
|
region = "asia-south1"
|
||||||
|
handler = ""
|
||||||
|
|
||||||
|
[build]
|
||||||
|
buildpack_builder = "paketobuildpacks/builder-jammy-base"
|
||||||
|
buildpacks = ["paketo-buildpacks/go"]
|
||||||
|
ignorefile = ".gitignore"
|
||||||
|
[build.args]
|
||||||
|
foo = "bar"
|
||||||
|
|
||||||
|
[env]
|
||||||
|
FOO = "BAR"
|
||||||
|
|
||||||
|
[http_service]
|
||||||
|
internal_port = 3000
|
||||||
|
|
||||||
|
[[http_service.checks]]
|
||||||
|
interval = "1m21s"
|
||||||
|
timeout = "7s"
|
||||||
|
grace_period = "2s"
|
||||||
|
method = "GET"
|
||||||
|
path = "/"
|
||||||
|
protocol = "http"
|
||||||
|
[http_service.checks.headers]
|
||||||
|
My-Custom-Header = "whatever"
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
fmt.Fprintf(w, "Hello World!")
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
// Register the handler function to handle requests to "/"
|
||||||
|
http.HandleFunc("/", handler)
|
||||||
|
|
||||||
|
// Start the HTTP server on port 3000
|
||||||
|
fmt.Println("Example app listening on port 3000!")
|
||||||
|
http.ListenAndServe(":3000", nil)
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user