Skip to content

Commit 099dc92

Browse files
committed
Merge branch 'master' of github.com:khanh101/khanh101.github.io
2 parents a618dd3 + 3227968 commit 099dc92

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fileserver.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ import (
55
"net/http"
66
)
77

8+
const (
9+
addr = "127.0.0.1:3000"
10+
)
11+
812
func main() {
913
fs := http.FileServer(http.Dir("./"))
1014
http.Handle("/", http.StripPrefix("/", fs))
11-
log.Println("Server is up: http://127.0.0.1:3000")
12-
log.Fatal(http.ListenAndServe("127.0.0.1:3000", nil))
15+
log.Println("Server is up:", addr)
16+
log.Fatal(http.ListenAndServe(addr, nil))
1317
}

0 commit comments

Comments
 (0)