create docker for the API
This commit is contained in:
@@ -5,12 +5,12 @@ import io.ktor.server.application.install
|
||||
import io.ktor.server.websocket.WebSockets
|
||||
import io.ktor.server.websocket.pingPeriod
|
||||
import io.ktor.server.websocket.timeout
|
||||
import java.time.Duration
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
fun Application.configureWebSockets() {
|
||||
install(WebSockets) {
|
||||
pingPeriod = Duration.ofSeconds(15)
|
||||
timeout = Duration.ofSeconds(15)
|
||||
pingPeriod = 15.seconds
|
||||
timeout = 15.seconds
|
||||
maxFrameSize = Long.MAX_VALUE
|
||||
masking = false
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.koin.ktor.ext.get
|
||||
|
||||
fun Application.declareHttpGameRoute() {
|
||||
routing {
|
||||
readTheGameState(get())
|
||||
readGamesList(get())
|
||||
readTheGameState(this@declareHttpGameRoute.get())
|
||||
readGamesList(this@declareHttpGameRoute.get())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user