refactor: call renterd earlier but wait until its ready
This commit is contained in:
parent
b16beebabb
commit
ca3d3588a4
8
main.go
8
main.go
|
@ -38,6 +38,11 @@ func main() {
|
|||
// Initialize the database connection
|
||||
db.Init()
|
||||
|
||||
// Start the renterd process in a goroutine
|
||||
go renterd.Main()
|
||||
|
||||
renterd.Ready()
|
||||
|
||||
// Create a new Iris app instance
|
||||
app := iris.New()
|
||||
|
||||
|
@ -76,9 +81,6 @@ func main() {
|
|||
// And the wildcard one for index.html, *.js, *.css and e.t.c.
|
||||
app.Get("/swagger/{any:path}", swaggerUI)
|
||||
|
||||
// Start the renterd process in a goroutine
|
||||
//go renterd.Main()
|
||||
|
||||
// Start the Iris app and listen for incoming requests on port 80
|
||||
log.Fatal(app.Listen(":8080", func(app *iris.Application) {
|
||||
routes := app.GetRoutes()
|
||||
|
|
Loading…
Reference in New Issue