ServerMain

trait ServerMain extends ZIOAppDefault

Quick-start server app.

trait ZIOAppDefault
trait ZIOApp
trait ZIOAppVersionSpecific
trait ZIOAppPlatformSpecific
class Object
trait Matchable
class Any

Type members

Inherited types

type Environment = ZEnv
Inherited from
ZIOAppDefault

Value members

Abstract methods

Concrete methods

def builder: T
def port: Int
def run: ZIO[Environment & ZEnv & ZIOAppArgs, Any, Any]
def serverLive: ZLayer[ZEnv, Throwable, Server]
def welcome: ZIO[ZEnv, Throwable, Unit]

Inherited methods

final
def <>(that: ZIOApp)(implicit trace: ZTraceElement): ZIOApp

Composes this ZIOApp with another ZIOApp, to yield an application that executes the logic of both applications.

Composes this ZIOApp with another ZIOApp, to yield an application that executes the logic of both applications.

Inherited from
ZIOApp
final
def exit(code: ExitCode)(implicit trace: ZTraceElement): UIO[Unit]

A helper function to exit the application with the specified exit code.

A helper function to exit the application with the specified exit code.

Inherited from
ZIOApp
final
def getArgs(implicit trace: ZTraceElement): ZIO[ZIOAppArgs, Nothing, Chunk[String]]

A helper function to obtain access to the command-line arguments of the application. You may use this helper function inside your run function.

A helper function to obtain access to the command-line arguments of the application. You may use this helper function inside your run function.

Inherited from
ZIOApp
def hook: RuntimeConfigAspect

A hook into the ZIO runtime configuration used for boostrapping the application. This hook can be used to install low-level functionality into the ZIO application, such as logging, profiling, and other similar foundational pieces of infrastructure.

A hook into the ZIO runtime configuration used for boostrapping the application. This hook can be used to install low-level functionality into the ZIO application, such as logging, profiling, and other similar foundational pieces of infrastructure.

Inherited from
ZIOApp
final
def invoke(args: Chunk[String])(implicit trace: ZTraceElement): ZIO[ZEnv, Any, Any]

Invokes the main app. Designed primarily for testing.

Invokes the main app. Designed primarily for testing.

Inherited from
ZIOApp
final
def main(args0: Array[String]): Unit

The Scala main function, intended to be called only by the Scala runtime.

The Scala main function, intended to be called only by the Scala runtime.

Inherited from
ZIOAppPlatformSpecific
def runtime: Runtime[ZEnv]
Inherited from
ZIOApp

Concrete fields

val myAppLogic: ZIO[ZEnv, Throwable, Nothing]

Inherited fields

val layer: ZLayer[ZIOAppArgs, Any, ZEnv]
Inherited from
ZIOAppDefault
val tag: Tag[ZEnv]
Inherited from
ZIOAppDefault

Implicits

Inherited implicits

implicit inline
def validateEnv[R, E, A](inline zio: ZIO[R, E, A]): ZIO[Environment & ZEnv & ZIOAppArgs, E, A]

This implicit conversion macro will ensure that the provided ZIO effect does not require more than the provided environment.

This implicit conversion macro will ensure that the provided ZIO effect does not require more than the provided environment.

If it is missing requirements, it will report a descriptive error message. Otherwise, the effect will be returned unmodified.

Inherited from
ZIOAppVersionSpecific