MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / frontendURL

Method frontendURL

tools/mage/js.go:87–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func (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
98func (Js) isProductionMode() bool {
99 switch v := os.Getenv("NODE_ENV"); v {

Callers 2

waitOnMethod · 0.95
runCypressMethod · 0.95

Calls 1

isProductionModeMethod · 0.95

Tested by

no test coverage detected