2020-07-29 16:21:55 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2020-07-31 20:11:31 +02:00
|
|
|
"gopkg.in/alecthomas/kingpin.v2"
|
2020-07-29 16:21:55 +02:00
|
|
|
)
|
|
|
|
|
2020-07-31 20:11:31 +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
|
|
|
|
2020-07-31 20:11:31 +02:00
|
|
|
func main() {
|
|
|
|
kingpin.Version("0.5")
|
|
|
|
kingpin.Parse()
|
2020-07-29 16:21:55 +02:00
|
|
|
|
|
|
|
s := Server{
|
|
|
|
port: ":8080",
|
2020-07-31 20:11:31 +02:00
|
|
|
dirPath: *dir,
|
2020-07-29 16:21:55 +02:00
|
|
|
}
|
|
|
|
s.Serve()
|
|
|
|
}
|