25 lines
381 B
Go
25 lines
381 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"net/http"
|
|
"vultras.su/util/tpp/server"
|
|
)
|
|
|
|
func main() {
|
|
var (
|
|
addr, src string
|
|
)
|
|
|
|
flag.StringVar(&addr, "http", ":8080", "HTTP address to serve")
|
|
flag.StringVar(&src, "src", "", "path to the source directory")
|
|
srv := http.Server{
|
|
Address: addr,
|
|
Handler: &server.Handler{
|
|
SourcePath: src,
|
|
},
|
|
}
|
|
|
|
log.Fatal(srv.ListenAndServe())
|
|
}
|
|
|