Skip to content

Hello World example from readme seems not to work #1254

@KovaxG

Description

@KovaxG

Hi, I really like the idea of finch, and I'm trying to test it out, but sadly I keep hitting obstacles.
First there was an issue with the versions, ( #1194) but I finally solved that. But now I can't get the example hello world to work either.

I'm trying

import io.finch._
import cats.effect.IO
import com.twitter.finagle.Http

object Server extends App with Endpoint.Module[IO] {
  val api: Endpoint[IO, String] = get("hello") { Ok("Hello, World!") }
  Http.server.serve(":8080", api.toServiceAs[Text.Plain])
}

but all I get is

Aug 12, 2020 1:16:58 PM com.twitter.finagle.Init$ $anonfun$once$1
INFO: Finagle version 20.3.0 (rev=e3fd6d1bd88c9ed7edeb98a6598e23800924c633) built at 20200308-110626

Process finished with exit code 0

I'm not sure if the problem is on my side or with the example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions