telegabber/telegabber.go

24 lines
417 B
Go
Raw Normal View History

2019-10-22 16:36:54 +00:00
package main
import (
"log"
"dev.narayana.im/narayana/telegabber/config"
"dev.narayana.im/narayana/telegabber/xmpp"
)
const CONFIG_PATH string = "config.yml"
2019-10-25 18:12:38 +00:00
const SCHEMA_PATH string = "./config_schema.json"
2019-10-22 16:36:54 +00:00
func main() {
2019-10-25 18:12:38 +00:00
config, err := config.ReadConfig(CONFIG_PATH, SCHEMA_PATH)
if err != nil {
log.Fatal(err)
}
2019-10-22 16:36:54 +00:00
cm := xmpp.NewComponent(config.Xmpp)
// reconnect automatically
log.Fatal(cm.Run())
}