aboutsummaryrefslogtreecommitdiff
path: root/telegabber.go
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2019-10-22 19:36:54 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2019-10-22 19:36:54 +0300
commit9b4a09677a352d9938e4505bfc2d0c8d304567ac (patch)
tree1863f0d4c58f4019f86910f76c96f5823fd01dd4 /telegabber.go
Hello world XMPP echo component
Diffstat (limited to 'telegabber.go')
-rw-r--r--telegabber.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/telegabber.go b/telegabber.go
new file mode 100644
index 0000000..dd1e187
--- /dev/null
+++ b/telegabber.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "log"
+
+ "dev.narayana.im/narayana/telegabber/config"
+ "dev.narayana.im/narayana/telegabber/xmpp"
+)
+
+const CONFIG_PATH string = "config.yml"
+
+func main() {
+ config := config.ReadConfig(CONFIG_PATH)
+ cm := xmpp.NewComponent(config.Xmpp)
+
+ // reconnect automatically
+ log.Fatal(cm.Run())
+}