Merge branch 'master' of github.com:Suwayomi/Tachidesk

This commit is contained in:
Aria Moradi
2021-05-03 20:41:46 +04:30
2 changed files with 9 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ import java.io.IOException
import java.text.SimpleDateFormat
import java.util.Date
import java.util.concurrent.CompletableFuture
import kotlin.concurrent.thread
/*
* Copyright (C) Contributors to the Suwayomi project
@@ -75,6 +76,13 @@ object JavalinSetup {
}
config.enableCorsForAllOrigins()
}.start(serverConfig.ip, serverConfig.port)
Runtime.getRuntime().addShutdownHook(
thread(start = false) {
app.stop()
}
)
if (hasWebUiBundled && serverConfig.initialOpenInBrowserEnabled) {
openInBrowser()
}