kodeshare/src/main/kotlin/moe/kageru/kodeshare/Kodeshare.kt

25 lines
683 B
Kotlin
Raw Normal View History

2019-09-19 22:04:23 +02:00
package moe.kageru.kodeshare
import io.ktor.application.install
import io.ktor.features.DefaultHeaders
2019-09-22 18:26:28 +02:00
import io.ktor.locations.KtorExperimentalLocationsAPI
2019-09-19 22:04:23 +02:00
import io.ktor.locations.Locations
import io.ktor.routing.routing
import io.ktor.server.engine.embeddedServer
import io.ktor.server.netty.Netty
import moe.kageru.kodeshare.Routes.createRoutes
2019-09-29 08:17:31 +02:00
import org.joda.time.DateTime
2019-09-19 22:04:23 +02:00
2019-09-22 18:26:28 +02:00
@KtorExperimentalLocationsAPI
2019-09-19 22:04:23 +02:00
@ExperimentalStdlibApi
fun main() {
embeddedServer(Netty, 9092) {
install(DefaultHeaders)
install(Locations)
routing {
createRoutes()
}
}.start(wait = true)
}
2019-09-29 08:17:31 +02:00
data class Paste(val content: String, val created: DateTime)