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

Method isProductionMode

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

Source from the content-addressed store, hash-verified

96}
97
98func (Js) isProductionMode() bool {
99 switch v := os.Getenv("NODE_ENV"); v {
100 case "", "production":
101 return true
102
103 case "development":
104 return false
105
106 default:
107 if mg.Verbose() {
108 fmt.Printf("Unknown `NODE_ENV` value `%s`, assuming production mode\n", v)
109 }
110 return true
111 }
112}
113
114func (js Js) deps() error {
115 if mg.Verbose() {

Callers 2

frontendURLMethod · 0.95
DepsMethod · 0.95

Calls 1

PrintfMethod · 0.45

Tested by

no test coverage detected