-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfeedify.go
More file actions
38 lines (29 loc) · 763 Bytes
/
feedify.go
File metadata and controls
38 lines (29 loc) · 763 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
37
38
package feedify
import (
// Golang packages
"fmt"
"strconv"
// Beego framework packages
"github.com/astaxie/beego"
// feedify packages
"github.com/feedlabs/feedify/config"
_ "github.com/feedlabs/feedify/stream/adapter/message"
_ "github.com/feedlabs/feedify/graph/adapter"
)
func GetConfigKey(key string) string {
return config.GetConfigKey(key)
}
func Banner() {
fmt.Printf("Starting app '%s' on port '%s'\n", config.GetConfigKey("appname"), config.GetConfigKey("feedify::port"))
}
func SetStaticPath(url string, path string) *beego.App {
return beego.SetStaticPath(url, path)
}
func Error(v ...interface{}) {
beego.Error(v...)
}
func Run() {
Banner()
beego.HttpPort, _ = strconv.Atoi(config.GetConfigKey("feedify::port"))
beego.Run()
}