Updated to openapi 3.1
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
package codes.kalar
|
||||
|
||||
import io.ktor.http.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.plugins.contentnegotiation.*
|
||||
import io.ktor.serialization.kotlinx.json.*
|
||||
import io.ktor.server.engine.*
|
||||
import io.ktor.server.netty.*
|
||||
import io.ktor.server.plugins.cors.routing.*
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
io.ktor.server.netty.EngineMain.main(args)
|
||||
embeddedServer(Netty, port = 8080) {
|
||||
install(CORS) {
|
||||
anyHost()
|
||||
allowHeader(HttpHeaders.ContentType)
|
||||
}
|
||||
}.start(wait = true)
|
||||
EngineMain.main(args)
|
||||
}
|
||||
|
||||
fun Application.module() {
|
||||
@@ -16,6 +26,7 @@ fun Application.module() {
|
||||
isLenient = true
|
||||
})
|
||||
}
|
||||
|
||||
configureHTTP()
|
||||
configureSecurity()
|
||||
configureSerialization()
|
||||
|
||||
Reference in New Issue
Block a user