Mokksy
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Example:
val mokksy = Mokksy()
mokksy.startSuspend()
mokksy.get { path("/ping") } respondsWith { body = "Pong" }
mokksy.shutdownSuspend()On JVM, dev.mokksy.mokksy.start and dev.mokksy.mokksy.shutdown blocking extensions are also available:
val mokksy = Mokksy().start()Java callers should use dev.mokksy.Mokksy.create instead.
Parameters
The host to bind to. Defaults to 127.0.0.1.
The port to bind to. Defaults to 0 (randomly assigned).
Enables DEBUG-level request logging when true. Defaults to false.
Additional Ktor Application configuration applied after the default routing setup.
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Example:
val mokksy = Mokksy()
mokksy.startSuspend()
mokksy.get { path("/ping") } respondsWith { body = "Pong" }
mokksy.shutdownSuspend()On JVM, dev.mokksy.mokksy.start and dev.mokksy.mokksy.shutdown blocking extensions are also available:
val mokksy = Mokksy().start()Java callers should use dev.mokksy.Mokksy.create instead.
Parameters
The host to bind to. Defaults to 127.0.0.1.
The port to bind to. Defaults to 0 (randomly assigned).
Enables DEBUG-level request logging when true. Defaults to false.
Additional Ktor Application configuration applied after the default routing setup.
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Example:
val mokksy = Mokksy()
mokksy.startSuspend()
mokksy.get { path("/ping") } respondsWith { body = "Pong" }
mokksy.shutdownSuspend()On JVM, dev.mokksy.mokksy.start and dev.mokksy.mokksy.shutdown blocking extensions are also available:
val mokksy = Mokksy().start()Java callers should use dev.mokksy.Mokksy.create instead.
Parameters
The host to bind to. Defaults to 127.0.0.1.
The port to bind to. Defaults to 0 (randomly assigned).
Enables DEBUG-level request logging when true. Defaults to false.
Additional Ktor Application configuration applied after the default routing setup.
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Example:
val mokksy = Mokksy()
mokksy.startSuspend()
mokksy.get { path("/ping") } respondsWith { body = "Pong" }
mokksy.shutdownSuspend()On JVM, dev.mokksy.mokksy.start and dev.mokksy.mokksy.shutdown blocking extensions are also available:
val mokksy = Mokksy().start()Java callers should use dev.mokksy.Mokksy.create instead.
Parameters
The host to bind to. Defaults to 127.0.0.1.
The port to bind to. Defaults to 0 (randomly assigned).
Enables DEBUG-level request logging when true. Defaults to false.
Additional Ktor Application configuration applied after the default routing setup.