mirror of
https://github.com/revanced/revanced-api.git
synced 2025-04-29 22:24:31 +02:00
feat: Use Jetty instead of Netty
This commit is contained in:
parent
ef927688a3
commit
c23cd5cdad
@ -17,6 +17,11 @@ tasks {
|
||||
group = "publishing"
|
||||
dependsOn(startShadowScripts)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
// Needed for Jetty to work.
|
||||
mergeServiceFiles()
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
@ -57,7 +62,7 @@ dependencies {
|
||||
implementation(libs.ktor.server.cors)
|
||||
implementation(libs.ktor.server.caching.headers)
|
||||
implementation(libs.ktor.server.host.common)
|
||||
implementation(libs.ktor.server.netty)
|
||||
implementation(libs.ktor.server.jetty)
|
||||
implementation(libs.ktor.server.conditional.headers)
|
||||
implementation(libs.ktor.serialization.kotlinx.json)
|
||||
implementation(libs.koin.ktor)
|
||||
|
@ -28,7 +28,7 @@ ktor-server-auth-jwt = { module = "io.ktor:ktor-server-auth-jwt" }
|
||||
ktor-server-cors = { module = "io.ktor:ktor-server-cors" }
|
||||
ktor-server-caching-headers = { module = "io.ktor:ktor-server-caching-headers" }
|
||||
ktor-server-host-common = { module = "io.ktor:ktor-server-host-common" }
|
||||
ktor-server-netty = { module = "io.ktor:ktor-server-netty" }
|
||||
ktor-server-jetty = { module = "io.ktor:ktor-server-jetty" }
|
||||
ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json" }
|
||||
koin-ktor = { module = "io.insert-koin:koin-ktor", version.ref = "koin" }
|
||||
h2 = { module = "com.h2database:h2", version.ref = "h2" }
|
||||
|
@ -6,7 +6,7 @@ import app.revanced.api.configuration.configureSecurity
|
||||
import app.revanced.api.configuration.configureSerialization
|
||||
import app.revanced.api.configuration.routing.configureRouting
|
||||
import io.ktor.server.engine.*
|
||||
import io.ktor.server.netty.*
|
||||
import io.ktor.server.jetty.*
|
||||
import picocli.CommandLine
|
||||
|
||||
@CommandLine.Command(
|
||||
@ -29,7 +29,7 @@ internal object StartAPICommand : Runnable {
|
||||
private var port: Int = 8080
|
||||
|
||||
override fun run() {
|
||||
embeddedServer(Netty, port, host) {
|
||||
embeddedServer(Jetty, port, host) {
|
||||
configureDependencies()
|
||||
configureHTTP(allowedHost = host)
|
||||
configureSerialization()
|
||||
|
@ -8,5 +8,4 @@
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
<logger name="org.eclipse.jetty" level="INFO"/>
|
||||
<logger name="io.netty" level="INFO"/>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
Loading…
x
Reference in New Issue
Block a user