2024-10-26 14:31:51 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-11-02 12:24:36 +00:00
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
2024-11-02 18:11:56 +00:00
|
|
|
"github.com/LeRoid-hub/humiditycalc/configs"
|
2024-10-26 14:31:51 +00:00
|
|
|
"github.com/LeRoid-hub/humiditycalc/server"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-11-02 18:11:56 +00:00
|
|
|
env := configs.Load()
|
2024-11-07 09:17:33 +00:00
|
|
|
|
|
|
|
switch env["MODE"] {
|
|
|
|
case "both":
|
|
|
|
server.Run(env)
|
|
|
|
case "weather":
|
2024-11-02 17:10:52 +00:00
|
|
|
server.Run(env)
|
2024-11-02 12:24:36 +00:00
|
|
|
// weather.Run()
|
2024-11-07 09:17:33 +00:00
|
|
|
case "calc":
|
|
|
|
server.Run(env)
|
2024-11-02 12:24:36 +00:00
|
|
|
// calc.Run()
|
2024-11-07 09:17:33 +00:00
|
|
|
default:
|
2024-11-02 17:10:52 +00:00
|
|
|
server.Run(env)
|
2024-11-07 09:33:35 +00:00
|
|
|
}
|
|
|
|
}
|
2024-11-02 12:24:36 +00:00
|
|
|
|