stash/main.go

29 lines
616 B
Go
Raw Normal View History

//go:generate go run -mod=vendor github.com/99designs/gqlgen
2019-02-09 12:30:49 +00:00
package main
import (
2019-02-14 23:42:52 +00:00
"github.com/stashapp/stash/pkg/api"
"github.com/stashapp/stash/pkg/database"
"github.com/stashapp/stash/pkg/manager"
"github.com/stashapp/stash/pkg/manager/config"
2019-02-09 12:30:49 +00:00
_ "github.com/golang-migrate/migrate/v4/database/sqlite3"
_ "github.com/golang-migrate/migrate/v4/source/file"
)
func main() {
manager.Initialize()
2020-08-06 01:21:14 +00:00
// perform the post-migration for new databases
if database.Initialize(config.GetDatabasePath()) {
manager.GetInstance().PostMigrate()
}
2019-02-09 12:30:49 +00:00
api.Start()
2019-02-11 10:49:39 +00:00
blockForever()
}
func blockForever() {
select {}
2019-02-09 12:30:49 +00:00
}