serve current directory
This commit is contained in:
parent
774307245f
commit
dd1e615d14
15
cmd/smweb/main.go
Normal file
15
cmd/smweb/main.go
Normal file
@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import "net/http"
|
||||
|
||||
func main() {
|
||||
http.Handle(
|
||||
"/",
|
||||
http.FileServer(
|
||||
http.Dir("."),
|
||||
),
|
||||
)
|
||||
if err := http.ListenAndServe(":8000", nil); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user