-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfelo.go
More file actions
36 lines (33 loc) · 724 Bytes
/
felo.go
File metadata and controls
36 lines (33 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
// std
"fmt"
"net/http"
// internal modules
"webscope.io/felo/modules/server"
"webscope.io/felo/modules/slack"
"webscope.io/felo/modules/supabase"
"webscope.io/felo/modules/utils"
)
func main() {
env, err := utils.ReadEnv()
if err != nil {
fmt.Println("Error reading .env file")
panic(err)
}
supabase := &supabase.Client{
SUPABASE_KEY: env.SUPABASE_KEY,
SUPABASE_URL: env.SUPABASE_URL,
}
db, err := supabase.Init(nil)
if err != nil {
fmt.Printf("Error initializing Supabase client")
panic(err)
}
slack := &slack.Client{
BOT_TOKEN: env.BOT_TOKEN,
API_URL: "https://slack.com/api",
HTTP_CLIENT: &http.Client{},
}
server.Start(env.ENV, env.PORT, slack, db)
}