http-dir-server/main.go

21 lines
295 B
Go
Raw Normal View History

2020-07-29 16:21:55 +02:00
package main
import (
"gopkg.in/alecthomas/kingpin.v2"
2020-07-29 16:21:55 +02:00
)
var (
dir = kingpin.Flag("directory", "Path to dir which has to be served.").Required().Short('d').String()
)
2020-07-29 16:21:55 +02:00
func main() {
kingpin.Version("0.5")
kingpin.Parse()
2020-07-29 16:21:55 +02:00
s := Server{
port: ":8080",
dirPath: *dir,
2020-07-29 16:21:55 +02:00
}
s.Serve()
}