This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-10-27 07:45:21 +04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
// local
|
2018-02-14 03:22:16 +04:00
|
|
|
"source.wtfteam.pro/wind8/wind8_fetcher/api"
|
|
|
|
"source.wtfteam.pro/wind8/wind8_fetcher/lib/appcontext"
|
2017-10-27 07:45:21 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
c := appcontext.New()
|
|
|
|
c.Init()
|
|
|
|
c.InitializeStartupFlags()
|
|
|
|
c.StartupFlags.Parse()
|
|
|
|
|
|
|
|
configPath, err := c.StartupFlags.GetStringValue("config")
|
|
|
|
if err != nil {
|
|
|
|
c.Log.Errorln(err)
|
|
|
|
c.Log.Fatal("Can't get config file parameter from command line. Exiting.")
|
|
|
|
}
|
|
|
|
c.InitializeConfig(configPath)
|
|
|
|
|
|
|
|
c.Log.Info("Starting API endpoints...")
|
|
|
|
api.Initialize(c)
|
|
|
|
api.InitializeEndpoints()
|
|
|
|
|
|
|
|
c.StartHTTPListener()
|
|
|
|
}
|