renumber again
This commit is contained in:
14
092-http-server-static/http-server-static.go
Normal file
14
092-http-server-static/http-server-static.go
Normal file
@@ -0,0 +1,14 @@
|
||||
// ## HTTP Server Static
|
||||
|
||||
package main
|
||||
|
||||
import "net/http"
|
||||
|
||||
func main() {
|
||||
handler := http.FileServer(http.Dir("./"))
|
||||
http.ListenAndServe(":5000", handler)
|
||||
}
|
||||
|
||||
// todo: index pages
|
||||
// todo: disable listing
|
||||
// todo: custom 404 handling
|
||||
5
092-http-server-static/http-server-static.sh
Normal file
5
092-http-server-static/http-server-static.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
$ go run http-server-static.go
|
||||
|
||||
$ curl http://127.0.0.1:5000/
|
||||
$ curl http://127.0.0.1:5000/http-server-static.go
|
||||
$ curl http://127.0.0.1:5000/missing
|
||||
Reference in New Issue
Block a user