1
This commit is contained in:
Alex Yatskov 2018-01-08 18:08:50 -08:00
parent 1ccbdfc155
commit 5d9cff7244
2 changed files with 7 additions and 4 deletions

View File

@ -26,7 +26,10 @@ func (b *builder) Build(srcDir, dstDir string) {
}
func main() {
port := flag.Int("port", 8080, "server port")
var (
dst = flag.String("dst", "dst", "destination directory")
port = flag.Int("port", 8080, "server port")
)
flag.Parse()
devserver.DevServe(new(builder), *port, "src", "dst", "layouts")
devserver.DevServe(new(builder), *port, "src", *dst, "layouts")
}

View File

@ -97,10 +97,10 @@ func (b *builder) Build(srcDir, dstDir string) {
func main() {
var (
dst = flag.String("dst", "dst", "destination directory")
root = flag.String("root", "", "root directory")
port = flag.Int("port", 8080, "server port")
)
flag.Parse()
devserver.DevServe(&builder{*root}, *port, "src", "dst", "layouts")
devserver.DevServe(&builder{*root}, *port, "src", *dst, "layouts")
}