()
| 85 | } |
| 86 | |
| 87 | func (js Js) frontendURL() string { |
| 88 | baseUrl := os.Getenv("CYPRESS_BASE_URL") |
| 89 | if baseUrl != "" { |
| 90 | return baseUrl |
| 91 | } |
| 92 | if js.isProductionMode() { |
| 93 | return fmt.Sprintf("http://localhost:%d", prodPort) |
| 94 | } |
| 95 | return fmt.Sprintf("http://localhost:%d", devPort) |
| 96 | } |
| 97 | |
| 98 | func (Js) isProductionMode() bool { |
| 99 | switch v := os.Getenv("NODE_ENV"); v { |
no test coverage detected