kiyonlin / dawn

An opinionated lightweight framework to build web api or application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸš€ Add daemon feature to dawn.

kiyonlin opened this issue Β· comments

commented

Describe the solution you'd like
Add daemon feature to dawn. Get options from global config.

Additional context
When daemon is enabled, dawn app can restart itself automatically when it crashes.

commented

🌢️ Notice

  • go run won't work in daemon mode
  • Please use go build to build a binary and run it

πŸ“” Usage

Set daemon options in config.toml

[Daemon]
Enable = true
Tries = 10
StdoutLogFile = "./daemon.log"
StderrLogFile = "./daemon.err"

And reference example for more details.