mirror of
https://github.com/owncast/owncast.git
synced 2025-11-01 10:55:57 +08:00
* First pass at centralized database reference. Closes #282 * Add verbose logging option to launch.json * Clear current broadcaster on stream end. Closes #285 * Fix typo in verbose launch args * Add support for purging tailwind styles. For #224 * Don't need to pass db as param since it is stored * Commit updated Javascript packages Co-authored-by: Owncast <owncast@owncast.online>
This commit is contained in:
13
main.go
13
main.go
@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/owncast/owncast/config"
|
||||
"github.com/owncast/owncast/core"
|
||||
"github.com/owncast/owncast/core/data"
|
||||
"github.com/owncast/owncast/metrics"
|
||||
"github.com/owncast/owncast/router"
|
||||
)
|
||||
@ -29,7 +30,7 @@ func main() {
|
||||
log.Infoln(getVersion())
|
||||
|
||||
configFile := flag.String("configFile", "config.yaml", "Config File full path. Defaults to current folder")
|
||||
chatDbFile := flag.String("chatDatabase", "", "Path to the chat database file.")
|
||||
dbFile := flag.String("database", "", "Path to the database file.")
|
||||
enableDebugOptions := flag.Bool("enableDebugFeatures", false, "Enable additional debugging options.")
|
||||
enableVerboseLogging := flag.Bool("enableVerboseLogging", false, "Enable additional logging.")
|
||||
|
||||
@ -50,14 +51,16 @@ func main() {
|
||||
}
|
||||
config.Config.EnableDebugFeatures = *enableDebugOptions
|
||||
|
||||
if *chatDbFile != "" {
|
||||
config.Config.ChatDatabaseFilePath = *chatDbFile
|
||||
} else if config.Config.ChatDatabaseFilePath == "" {
|
||||
config.Config.ChatDatabaseFilePath = "chat.db"
|
||||
if *dbFile != "" {
|
||||
config.Config.DatabaseFilePath = *dbFile
|
||||
} else if config.Config.DatabaseFilePath == "" {
|
||||
config.Config.DatabaseFilePath = config.Config.GetDataFilePath()
|
||||
}
|
||||
|
||||
go metrics.Start()
|
||||
|
||||
data.SetupPersistence()
|
||||
|
||||
// starts the core
|
||||
if err := core.Start(); err != nil {
|
||||
log.Error("failed to start the core package")
|
||||
|
||||
Reference in New Issue
Block a user