Add default command back in

This commit is contained in:
2022-11-29 10:23:42 +01:00
parent 8433170681
commit 427e287895
3 changed files with 21 additions and 3 deletions

View File

@ -15,7 +15,12 @@ import (
)
func watchAction(ctx *cli.Context) error {
cfgPath := ctx.String("c")
cfgPath, err := filepath.Abs(ctx.String("c"))
if err != nil {
return err
}
os.Chdir(filepath.Dir(cfgPath))
optsSetups := readCfg(cfgPath)
@ -100,7 +105,8 @@ func watchAction(ctx *cli.Context) error {
go func() {
fmt.Println("Starting live reload server")
lr := lrserver.New(lrserver.DefaultName, lrserver.DefaultPort)
port := ctx.Uint("lr-port")
lr := lrserver.New(lrserver.DefaultName, uint16(port))
go func() {
for {