File tree Expand file tree Collapse file tree 4 files changed +21
-19
lines changed Expand file tree Collapse file tree 4 files changed +21
-19
lines changed Original file line number Diff line number Diff line change 3
3
"isRoot" : true ,
4
4
"tools" : {
5
5
"fantomas" : {
6
- "version" : " 6.1 .1" ,
6
+ "version" : " 7.0 .1" ,
7
7
"commands" : [
8
8
" fantomas"
9
- ]
9
+ ],
10
+ "rollForward" : false
10
11
}
11
12
}
12
13
}
Original file line number Diff line number Diff line change
1
+ module Env
2
+
3
+ open System
4
+
5
+ let private setEnvVarDefaultValue ( defaultValue : string ) ( readEnvVar : string ) =
6
+ match readEnvVar with
7
+ | null -> defaultValue
8
+ | _ -> readEnvVar
9
+
10
+ let HOST =
11
+ Environment.GetEnvironmentVariable " HOST" |> setEnvVarDefaultValue " localhost"
12
+
13
+ let PORT = Environment.GetEnvironmentVariable " PORT" |> setEnvVarDefaultValue " 8085"
Original file line number Diff line number Diff line change 2
2
<Project Sdk =" Microsoft.NET.Sdk" >
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >net7 .0</TargetFramework >
5
+ <TargetFramework >net9 .0</TargetFramework >
6
6
</PropertyGroup >
7
7
<ItemGroup >
8
+ <Compile Include =" Env.fs" />
8
9
<Compile Include =" src/DataScience/DataScience.fs" />
9
10
<Compile Include =" src/Monitoring/Prometheus.fs" />
10
11
<Compile Include =" src/Controllers/Health.controller.fs" />
22
23
<PackageReference Include =" prometheus-net.AspNetCore" Version =" 8.0.1" />
23
24
<PackageReference Include =" Saturn" Version =" 0.16.1" />
24
25
</ItemGroup >
25
- </Project >
26
+ </Project >
Original file line number Diff line number Diff line change 1
1
open Saturn
2
2
3
- open System
4
-
5
3
open API.Server
6
4
7
- let setEnvVarDefaultValue ( defaultValue : string ) ( readEnvVar : string ) =
8
- match readEnvVar with
9
- | null -> defaultValue
10
- | _ -> readEnvVar
11
-
12
- let HOST : string =
13
- Environment.GetEnvironmentVariable " HOST" |> setEnvVarDefaultValue " localhost"
14
-
15
- let PORT : string =
16
- Environment.GetEnvironmentVariable " PORT" |> setEnvVarDefaultValue " 8085"
17
-
18
5
[<EntryPoint>]
19
- let main ( args : string []) =
20
- run ( serverConfig ( HOST) ( PORT))
6
+ let main ( _args : string []) =
7
+ do run ( serverConfig ( Env. HOST) ( Env. PORT))
21
8
0
You can’t perform that action at this time.
0 commit comments