Skip to content

Commit f462361

Browse files
author
Yuanlin Lin
committed
fix: gleam format
1 parent cfbdfc3 commit f462361

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/my_web_app.gleam

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import mist
2-
import gleam/erlang/process
31
import gleam/bytes_builder
4-
import gleam/http/response.{Response}
52
import gleam/erlang/os
3+
import gleam/erlang/process
4+
import gleam/http/response.{Response}
65
import gleam/int
6+
import mist
77

88
pub fn get_port() -> Int {
99
case os.get_env("PORT") {
10-
Ok(value) -> case int.parse(value) {
11-
Error(e) -> 8080
12-
Ok(i) -> i
13-
}
14-
Error(_) -> 8080 // If the environment variable is not set, fallback to 8080
10+
Ok(value) ->
11+
case int.parse(value) {
12+
Error(e) -> 8080
13+
Ok(i) -> i
14+
}
15+
Error(_) -> 8080
1516
}
1617
}
1718

0 commit comments

Comments
 (0)