Skip to content

Instantly share code, notes, and snippets.

@elyphas
Created July 24, 2025 01:20
Show Gist options
  • Select an option

  • Save elyphas/99bc71750d36ec8a9f8fd4dbbc69d94f to your computer and use it in GitHub Desktop.

Select an option

Save elyphas/99bc71750d36ec8a9f8fd4dbbc69d94f to your computer and use it in GitHub Desktop.
ws_analytics[ERROR] [WARNING] IOApp `main` is running on a thread other than the main thread.
ws_analytics[ERROR] This may prevent correct resource cleanup after `main` completes.
ws_analytics[ERROR] This condition could be caused by executing `run` in an interactive sbt session with `fork := false`.
ws_analytics[ERROR] Set `Compile / run / fork := true` in this project to resolve this.
ws_analytics[ERROR]
ws_analytics[ERROR] To silence this warning set the system property:
ws_analytics[ERROR] `-Dcats.effect.warnOnNonMainThreadDetected=false`.
ws_analytics[ERROR]
/**From this code*/
private val runServer: IO[ExitCode] =
EmberServerBuilder
.default[IO]
.withPort(port"7777")
.withHost(host"127.0.0.1") // Usually people use 0.0.0.0 to bind to any public IP address of your machine.
.withHttpApp(appWithErrorLogging)
.build
.use { server =>
logger.info(s"Server started on port ${server.address.getPort}") >>
IO.never[ExitCode]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment