IsServerRunning checks if the server is currently running.
(cfg *config.Config)
| 107 | |
| 108 | // IsServerRunning checks if the server is currently running. |
| 109 | func IsServerRunning(cfg *config.Config) bool { |
| 110 | return isServerHealthy(cfg.Host, cfg.Port) |
| 111 | } |
| 112 | |
| 113 | func isServerHealthy(host string, port int) bool { |
| 114 | client := &http.Client{Timeout: 1 * time.Second} |
no test coverage detected