mirror of
https://github.com/owncast/owncast.git
synced 2024-11-24 21:59:43 +03:00
487bd12444
* 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>
33 lines
728 B
Go
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)
|
|
}
|
|
}
|