telegabber/telegabber.go

26 lines
518 B
Go
Raw Normal View History

2019-10-22 19:36:54 +03:00
package main
import (
"log"
"dev.narayana.im/narayana/telegabber/config"
"dev.narayana.im/narayana/telegabber/xmpp"
)
2019-10-29 04:23:57 +03:00
// YAML config, compatible with the format of Zhabogram 2.0.0
const configPath string = "config.yml"
// JSON schema (not for editing by a user)
const schemaPath string = "./config_schema.json"
2019-10-22 19:36:54 +03:00
func main() {
2019-10-29 04:23:57 +03:00
config, err := config.ReadConfig(configPath, schemaPath)
if err != nil {
log.Fatal(err)
}
2019-10-29 04:23:57 +03:00
cm := xmpp.NewComponent(config.XMPP)
2019-10-22 19:36:54 +03:00
// reconnect automatically
log.Fatal(cm.Run())
}