-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
51 lines (46 loc) · 1.23 KB
/
main.go
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package main
import (
"fmt"
"github.com/PiperFinance/BS/src/conf"
"github.com/PiperFinance/BS/src/core/events"
BSP "github.com/PiperFinance/BS/src/playground"
_ "github.com/joho/godotenv/autoload"
)
// init App startup configurations
func init() {
fmt.Println("BOOT : Loading Configs ... ")
conf.LoadConfig()
fmt.Println("BOOT : Loading Debug Tools ... ")
conf.LoadDebugItems()
fmt.Println("BOOT : Loading Logger ... ")
conf.LoadLogger()
fmt.Println("BOOT : Loading Local Cache ... ")
conf.LoadLocalCache()
fmt.Println("BOOT : Loading Mongo ...")
conf.LoadMongo()
fmt.Println("BOOT : Loading Redis ...")
conf.LoadRedis()
fmt.Println("BOOT : Loading Tokens ...")
conf.LoadTokens()
fmt.Println("BOOT : Loading Mainnets ...")
conf.LoadMainNets()
fmt.Println("BOOT : Loading Networks ...")
conf.LoadNetwork()
fmt.Println("BOOT : Initializing project workspace ...")
conf.LoadProjectInit()
fmt.Println("BOOT : Loading Q ...")
conf.LoadQueue()
fmt.Println("BOOT : Loading Default Parser ...")
events.LoadParserDeps()
}
// ONLY FOR TESTING PURPOSES ...
func main() {
if conf.Config.IsPlayground {
BSP.PlayHere()
} else if conf.Config.IsLocal {
(&StartConf{}).StartLocalConf()
} else {
(&StartConf{}).StartAll()
}
select {}
}