tangled
alpha
login
or
join now
kacaii.dev
/
senac-brigade-server
0
fork
atom
wip: currently rewriting the project as a full stack application
tangled.org/kacaii.dev/sigo
gleam
0
fork
atom
overview
issues
1
pulls
pipelines
:recycle: bind to env
kacaii.dev
3 months ago
2efba49a
47595e84
+5
-3
1 changed file
expand all
collapse all
unified
split
src
app
supervision_tree.gleam
+5
-3
src/app/supervision_tree.gleam
···
1
1
import app/web/context
2
2
+
import envoy
2
3
import gleam/erlang/process
3
4
import gleam/http/request
4
5
import gleam/http/response
···
33
34
}
34
35
}
35
36
36
36
-
let bind_to = case ctx.env {
37
37
-
context.Dev -> "localhost"
38
38
-
context.Production -> "0.0.0.0"
37
37
+
let bind_to = case ctx.env, envoy.get("SIGO_HOST") {
38
38
+
context.Production, _ -> "0.0.0.0"
39
39
+
context.Dev, Ok(bind) -> bind
40
40
+
context.Dev, _ -> "localhost"
39
41
}
40
42
41
43
// Adding Mist to the supervision tree