Skip to content

Commit

Permalink
Change adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguililla committed Jan 18, 2024
1 parent 7a4fad5 commit 3f64fa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import org.graalvm.buildtools.gradle.dsl.GraalVMExtension
import java.lang.System.getProperty

plugins {
kotlin("jvm") version("1.9.21")
kotlin("jvm") version("1.9.22")
id("org.graalvm.buildtools.native") version("0.9.28")
}

val hexagonVersion = "3.4.5"
val hexagonVersion = "3.4.6"
val gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/$hexagonVersion/gradle"

ext.set("options", "-Xmx48m")
Expand All @@ -24,9 +24,8 @@ group="org.example"
description="Service's description"

dependencies {
"implementation"("com.hexagonkt:http_server_jetty:$hexagonVersion")
"implementation"("com.hexagonkt:http_server_netty:$hexagonVersion")
"implementation"("com.hexagonkt:serialization_jackson_json:$hexagonVersion")
"implementation"("org.slf4j:slf4j-nop:2.0.9")

"testImplementation"("com.hexagonkt:http_client_jetty:$hexagonVersion")
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/rest/RestApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.hexagonkt.http.server.HttpServer
import com.hexagonkt.http.server.HttpServerSettings
import com.hexagonkt.http.handlers.HttpHandler
import com.hexagonkt.http.handlers.path
import com.hexagonkt.http.server.jetty.JettyServletAdapter
import com.hexagonkt.http.server.netty.NettyServerAdapter
import com.hexagonkt.serialization.jackson.json.Json
import com.hexagonkt.serialization.serialize
import org.example.domain.AppointmentsService
Expand Down Expand Up @@ -60,6 +60,6 @@ class RestApi(
}

private val settings = HttpServerSettings(ALL_INTERFACES, bindPort)
private val serverAdapter = JettyServletAdapter(minThreads = 4)
private val serverAdapter = NettyServerAdapter()
val server: HttpServer = HttpServer(serverAdapter, applicationHandler, settings)
}

0 comments on commit 3f64fa4

Please sign in to comment.