summaryrefslogtreecommitdiff
path: root/hello-go.go
blob: ab024ae623383e80a76d1218cd155b8e1ce2cee9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main

import (
	"net/http"
	"fmt"
	"os"
	// "runtime/debug"
)

func main() {
	// debug.SetMaxThreads(2)
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		fmt.Fprintf(w, "Hello, world!")
	})

	fmt.Printf("pid: %d\n", os.Getpid())
	http.ListenAndServe(":8081", nil)
}