write a config module

This commit is contained in:
Travis Shears 2026-03-23 13:05:21 +01:00
parent 7149273986
commit 4fc398bb26
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
11 changed files with 115 additions and 50 deletions

View file

@ -1,5 +1,17 @@
import config
import gleam/io
pub fn main() -> Nil {
io.println("Hello from weather_portal!")
case config.load_config() {
Ok(cfg) -> {
io.println("Config loaded successfully!")
io.println("MQTT Host: " <> cfg.mqtt_host)
io.println("MQTT User: " <> cfg.mqtt_user)
io.println("MQTT PW: " <> cfg.mqtt_pw)
io.println("JWT Key: " <> cfg.jwt_key)
}
Error(err) -> {
io.println("Failed to load config: " <> err)
}
}
}