com.lightningkite.lightningserver.routes.Routes.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-core Show documentation
Show all versions of server-core Show documentation
A set of tools to fill in/replace what Ktor is lacking in.
The newest version!
package com.lightningkite.lightningserver.routes
import com.lightningkite.lightningserver.core.ServerPath
import com.lightningkite.lightningserver.settings.generalSettings
private val docNames = HashMap()
public var ServerPath.docName: String?
get() = docNames[this]
set(value) {
docNames[this] = value
}
fun ServerPath.fullUrl(parts: Map = mapOf(), wildcard: String = ""): String =
generalSettings().publicUrl + this.toString(parts = parts, wildcard = wildcard)