Reputation: 26482
I'm trying to make compileDaemon to compile and serve my Go Echo application whenever I make changes to the source code. The commands that I tried are,
CompileDaemon -build="go run main.go"
and
CompileDaemon -command="go run main.go"
both of them starts CompileDaemon
with the following output
2018/12/17 10:40:29 Running build command!
2018/12/17 10:40:29 Build ok.
Whenever I update the source, the output repeats but my server is not starting . How do I make compileDaemon to run my echo server?
Thanks
Upvotes: 0
Views: 339
Reputation: 26482
Add the project directory to the command, for the current directory .
,
CompileDaemon -directory=. -command="go run main.go"
which will work.
Upvotes: 1