Http4sApp

snunit.Http4sApp
trait Http4sApp extends Simple

Attributes

Graph
Supertypes
trait Simple
trait EpollApp
trait Simple
trait IOApp
class Object
trait Matchable
class Any
Show all

Members list

Value members

Abstract methods

def routes: Resource[IO, HttpApp[IO]]

Concrete methods

override def run: IO[Unit]

Attributes

Definition Classes
Simple

Inherited methods

final def main(args: Array[String]): Unit

Attributes

Inherited from:
IOApp
final def run(args: List[String]): IO[ExitCode]

The entry point for your application. Will be called by the runtime when the process is started. If the underlying runtime supports it, any arguments passed to the process will be made available in the args parameter. The numeric value within the resulting ExitCode will be used as the exit code when the process terminates unless terminated exceptionally or by interrupt.

The entry point for your application. Will be called by the runtime when the process is started. If the underlying runtime supports it, any arguments passed to the process will be made available in the args parameter. The numeric value within the resulting ExitCode will be used as the exit code when the process terminates unless terminated exceptionally or by interrupt.

Value parameters

args

The arguments passed to the process, if supported by the underlying runtime. For example, java com.company.MyApp --foo --bar baz or node com-mycompany-fastopt.js --foo --bar baz would each result in List("--foo", "--bar", "baz").

Attributes

See also

IOApp.Simple!.run:cats\.effect\.IO[Unit]*

Inherited from:
Simple

Inherited fields

final lazy override val runtime: IORuntime

The runtime which will be used by IOApp to evaluate the IO produced by the run method. This may be overridden by IOApp implementations which have extremely specialized needs, but this is highly unlikely to ever be truly needed. As an example, if an application wishes to make use of an alternative compute thread pool (such as Executors.fixedThreadPool), it is almost always better to leverage IO.evalOn on the value produced by the run method, rather than directly overriding runtime.

The runtime which will be used by IOApp to evaluate the IO produced by the run method. This may be overridden by IOApp implementations which have extremely specialized needs, but this is highly unlikely to ever be truly needed. As an example, if an application wishes to make use of an alternative compute thread pool (such as Executors.fixedThreadPool), it is almost always better to leverage IO.evalOn on the value produced by the run method, rather than directly overriding runtime.

In other words, this method is made available to users, but its use is strongly discouraged in favor of other, more precise solutions to specific use-cases.

This value is guaranteed to be equal to unsafe.IORuntime.global.

Attributes

Inherited from:
EpollApp