Administration.kt 552 B

12345678910111213141516
  1. package ru.mephi.plugins
  2. import io.ktor.server.engine.*
  3. import io.ktor.application.*
  4. import io.ktor.response.*
  5. import io.ktor.request.*
  6. fun Application.configureAdministration() {
  7. install(ShutDownUrl.ApplicationCallFeature) {
  8. // The URL that will be intercepted (you can also use the application.conf's ktor.deployment.shutdown.url key)
  9. shutDownUrl = "/ktor/application/shutdown"
  10. // A function that will be executed to get the exit code of the process
  11. exitCodeSupplier = { 0 } // ApplicationCall.() -> Int
  12. }
  13. }