You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
605 B
27 lines
605 B
package allin
|
|
|
|
import allin.routing.BasicRouting
|
|
import allin.routing.UserRouter
|
|
import io.ktor.http.*
|
|
import io.ktor.serialization.kotlinx.json.*
|
|
import io.ktor.server.application.*
|
|
import io.ktor.server.engine.*
|
|
import io.ktor.server.netty.*
|
|
import io.ktor.server.plugins.contentnegotiation.*
|
|
import io.ktor.server.response.*
|
|
import io.ktor.server.routing.*
|
|
|
|
fun main() {
|
|
embeddedServer(Netty,port=8080,host="0.0.0.0"){
|
|
extracted()
|
|
}.start(wait = true)
|
|
}
|
|
|
|
private fun Application.extracted() {
|
|
install(ContentNegotiation) {
|
|
json()
|
|
}
|
|
BasicRouting()
|
|
UserRouter()
|
|
}
|