Skip to content

SSE with a project having shared routes for jvm and scalajs #4724

@larochef

Description

@larochef

Hello, I have a project using scalajs for the front and tapir with netty sync for the backend.

I'm currently wanting add some SSE endpoints and so had a look at the corresponding example at https://github.com/softwaremill/tapir/blob/master/examples/src/main/scala/sttp/tapir/examples/sse/sseNettySyncServer.scala

This example shows that we need, in the route definition, some classes coming from the server part, describing the streaming. However, this doesn't seem to make any sense for the scalajs client, which shouldn't know about netty or ox.

how would you recommend sharing the route definitions between back and front for SSE? Also, do you have some example code using a SSE client with tapir?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions