diff --git a/bee.json b/bee.json index 51dcd07..164b7f6 100644 --- a/bee.json +++ b/bee.json @@ -1,5 +1,9 @@ { "dir_structure":{ - "controllers": "routers" - } + "controllers": "", + "models": "" + }, + "files": [ + "main.go" + ] } \ No newline at end of file diff --git a/run.go b/run.go index 212652e..4b3b3be 100644 --- a/run.go +++ b/run.go @@ -40,6 +40,7 @@ var conf struct { Controllers string Models string } `json:"dir_structure"` + Files []string } func runApp(cmd *Command, args []string) { @@ -58,6 +59,7 @@ func runApp(cmd *Command, args []string) { paths = append(paths, path.Join(crupath, conf.DirStruct.Controllers), path.Join(crupath, conf.DirStruct.Models)) + paths = append(paths, conf.Files...) NewWatcher(paths) appname = args[0] diff --git a/watch.go b/watch.go index 5fa0c02..db6bc0b 100644 --- a/watch.go +++ b/watch.go @@ -53,6 +53,8 @@ func NewWatcher(paths []string) { } } }() + + fmt.Println("[INFO] Initializing watcher...") for _, path := range paths { fmt.Println(path) err = watcher.Watch(path)