pkger/examples/http/std/main.go

18 lines
222 B
Go
Raw Permalink Normal View History

2019-10-17 20:45:22 +03:00
package main
import (
"log"
"net/http"
)
func main() {
if err := run(); err != nil {
log.Fatal(err)
}
}
func run() error {
dir := http.FileServer(http.Dir("./public"))
return http.ListenAndServe(":3000", dir)
}