-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
49 lines (38 loc) · 1.61 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
/* Copyright © INFINI Ltd. All rights reserved.
* web: https://infinilabs.com
* mail: hello#infini.ltd */
package main
import (
"infini.sh/coco/config"
_ "infini.sh/coco/modules"
"infini.sh/framework"
"infini.sh/framework/core/module"
"infini.sh/framework/core/util"
apiModule "infini.sh/framework/modules/api"
stats "infini.sh/framework/plugins/stats_statsd"
)
func main() {
terminalHeader := (" ___ ___ ___ ___ _ _____ \n")
terminalHeader += (" / __\\/___\\/ __\\/___\\ /_\\ \\_ \\\n")
terminalHeader += (" / / // // / // // //_\\\\ / /\\/\n")
terminalHeader += ("/ /__/ \\_// /__/ \\_// / _ \\/\\/ /_ \n")
terminalHeader += ("\\____|___/\\____|___/ \\_/ \\_/\\____/ \n\n")
terminalFooter := ("")
app := framework.NewApp("coco", "Coco AI - search, connect, collaborate – all in one place.",
util.TrimSpaces(config.Version), util.TrimSpaces(config.BuildNumber), util.TrimSpaces(config.LastCommitLog), util.TrimSpaces(config.BuildDate), util.TrimSpaces(config.EOLDate), terminalHeader, terminalFooter)
app.IgnoreMainConfigMissing()
app.Init(nil)
defer app.Shutdown()
if app.Setup(func() {
module.RegisterSystemModule(&apiModule.APIModule{})
module.RegisterUserPlugin(&stats.StatsDModule{})
//vfs.RegisterFS(ui.StaticFS{StaticFolder: global.Env().SystemConfig.WebAppConfig.UI.LocalPath,
// TrimLeftPath: global.Env().SystemConfig.WebAppConfig.UI.LocalPath,
// CheckLocalFirst: global.Env().SystemConfig.WebAppConfig.UI.LocalEnabled,
// SkipVFS: !global.Env().SystemConfig.WebAppConfig.UI.VFSEnabled})
module.Start()
}, func() {
}, nil) {
app.Run()
}
}