owncast/main.go
Bradley Hilton 487bd12444
Project restructure (#18)
* First pass at restructuring the project; untested but it does compile

* Restructure builds and runs 🎉

* Add the dist folder to the gitignore

* Update core/playlist/monitor.go

* golint and reorganize the monitor.go file

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2020-06-22 18:11:56 -07:00

33 lines
728 B
Go

package main
import (
log "github.com/sirupsen/logrus"
"github.com/gabek/owncast/config"
"github.com/gabek/owncast/core"
"github.com/gabek/owncast/router"
)
func main() {
// logrus.SetReportCaller(true)
log.Println(core.GetVersion())
//TODO: potentially load the config from a flag like:
//configFile := flag.String("configFile", "config.yaml", "Config File full path. Defaults to current folder")
// flag.Parse()
if err := config.Load("config.yaml"); err != nil {
panic(err)
}
// starts the core
if err := core.Start(); err != nil {
log.Println("failed to start the core package")
panic(err)
}
if err := router.Start(); err != nil {
log.Println("failed to start/run the router")
panic(err)
}
}