{"action":"created","issue":{"url":"https://api.github.com/repos/finagle/finch/issues/1022","repository_url":"https://api.github.com/repos/finagle/finch","labels_url":"https://api.github.com/repos/finagle/finch/issues/1022/labels{/name}","comments_url":"https://api.github.com/repos/finagle/finch/issues/1022/comments","events_url":"https://api.github.com/repos/finagle/finch/issues/1022/events","html_url":"https://github.com/finagle/finch/issues/1022","id":377374869,"node_id":"MDU6SXNzdWUzNzczNzQ4Njk=","number":1022,"title":"Hello world not working","user":{"login":"octavz","id":23629302,"node_id":"MDQ6VXNlcjIzNjI5MzAy","avatar_url":"https://avatars1.githubusercontent.com/u/23629302?v=4","gravatar_id":"","url":"https://api.github.com/users/octavz","html_url":"https://github.com/octavz","followers_url":"https://api.github.com/users/octavz/followers","following_url":"https://api.github.com/users/octavz/following{/other_user}","gists_url":"https://api.github.com/users/octavz/gists{/gist_id}","starred_url":"https://api.github.com/users/octavz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octavz/subscriptions","organizations_url":"https://api.github.com/users/octavz/orgs","repos_url":"https://api.github.com/users/octavz/repos","events_url":"https://api.github.com/users/octavz/events{/privacy}","received_events_url":"https://api.github.com/users/octavz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-05T12:15:55Z","updated_at":"2018-11-06T23:13:08Z","closed_at":null,"author_association":"NONE","body":"Hi, I am sure I am doing something wrong, but Finch is very unfriendly with first time users.\r\n\r\nI couldn't find any template that works out of the box so I adapted:\r\n\r\n```import io.finch._\r\nimport cats.effect.IO\r\nimport com.twitter.finagle.Http\r\n\r\nobject Main extends App with Endpoint.Module[IO] {\r\n    val api: Endpoint[IO, String] = get(\"hello\") { Ok(\"Hello, World!\") }\r\n    Http.server.serve(\":8080\", api.toServiceAs[Text.Plain])\r\n}\r\n```\r\n\r\n```\r\nscalaVersion := \"2.12.7\"\r\n\r\nlibraryDependencies ++= Seq(\r\n  \"org.typelevel\" %% \"cats-core\" % \"1.4.0\",\r\n  \"org.typelevel\" %% \"cats-effect\" % \"1.0.0\",\r\n  // -- config\r\n  \"com.typesafe\" % \"config\" % \"1.3.3\",\r\n  // -- testing --\r\n  \"org.scalacheck\" %% \"scalacheck\" % \"1.14.0\" % \"test\",\r\n  // -- Logging --\r\n  \"ch.qos.logback\" % \"logback-classic\" % \"1.2.3\",\r\n  \"com.typesafe.scala-logging\" %% \"scala-logging\" % \"3.9.0\",\r\n  // -- Finch --\r\n  \"com.github.finagle\" %% \"finch-core\" % FinchVersion,\r\n  \"com.github.finagle\" %% \"finch-circe\" % FinchVersion,\r\n  // -- json/circe --\r\n  \"io.circe\" %% \"circe-core\" % CirceVersion,\r\n  \"io.circe\" %% \"circe-generic\" % CirceVersion,\r\n  \"io.circe\" %% \"circe-jawn\" % CirceVersion\r\n)\r\n```\r\n\r\nand I get \r\n\r\n```\r\n[error] /home/xxx/projects/scala/kafka-support/src/main/scala/org/demo/Main.scala:7:39: type Module is not a member of object io.finch.Endpoint\r\n[error] object Main extends App with Endpoint.Module[IO] {\r\n[error]                                       ^\r\n[error] /home/xxx/projects/scala/kafka-support/src/main/scala/org/demo/Main.scala:8:14: wrong number of type arguments for io.finch.Endpoint, should be 1\r\n[error]     val api: Endpoint[IO, String] = get(\"hello\") { Ok(\"Hello, World!\") }\r\n[error]              ^\r\n[error] /home/xxx/projects/scala/kafka-support/src/main/scala/org/demo/Main.scala:8:41: type mismatch;\r\n[error]  found   : String(\"hello\")\r\n[error]  required: ?{def apply: ?}\r\n[error] Note that implicit conversions are not applicable because they are ambiguous:\r\n[error]  both method augmentString in object Predef of type (x: String)scala.collection.immutable.StringOps\r\n[error]  and method stringToPath in trait Paths of type (s: String)io.finch.Endpoint[shapeless.HNil]\r\n[error]  are possible conversion functions from String(\"hello\") to ?{def apply: ?}\r\n[error]     val api: Endpoint[IO, String] = get(\"hello\") { Ok(\"Hello, World!\") }\r\n[error]                                         ^\r\n[error] /home/xxx/projects/scala/kafka-support/src/main/scala/org/demo/Main.scala:8:37: not found: value get\r\n[error]     val api: Endpoint[IO, String] = get(\"hello\") { Ok(\"Hello, World!\") }\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/finagle/finch/issues/comments/436443849","html_url":"https://github.com/finagle/finch/issues/1022#issuecomment-436443849","issue_url":"https://api.github.com/repos/finagle/finch/issues/1022","id":436443849,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjQ0Mzg0OQ==","user":{"login":"vkostyukov","id":1098539,"node_id":"MDQ6VXNlcjEwOTg1Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1098539?v=4","gravatar_id":"","url":"https://api.github.com/users/vkostyukov","html_url":"https://github.com/vkostyukov","followers_url":"https://api.github.com/users/vkostyukov/followers","following_url":"https://api.github.com/users/vkostyukov/following{/other_user}","gists_url":"https://api.github.com/users/vkostyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkostyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkostyukov/subscriptions","organizations_url":"https://api.github.com/users/vkostyukov/orgs","repos_url":"https://api.github.com/users/vkostyukov/repos","events_url":"https://api.github.com/users/vkostyukov/events{/privacy}","received_events_url":"https://api.github.com/users/vkostyukov/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T23:13:08Z","updated_at":"2018-11-06T23:13:08Z","author_association":"MEMBER","body":"Hey @octavz! Try looking at https://github.com/finch/finch.g8 that I compose today. It has an instruction on how to generate a barebones Finch project that compiles and runs."}}
{"actor":{"display_login":"vkostyukov"}}