Skip to content

Feral for AzureFunctions - #671

Open
Tim-waw wants to merge 21 commits into
typelevel:mainfrom
Tim-waw:main
Open

Feral for AzureFunctions#671
Tim-waw wants to merge 21 commits into
typelevel:mainfrom
Tim-waw:main

Conversation

@Tim-waw

@Tim-waw Tim-waw commented Aug 2, 2026

Copy link
Copy Markdown

Added support for creating Azure Function Apps with Http4s.

Simple usage example:

import org.http4s.HttpApp
import org.http4s.HttpRoutes
import org.http4s.dsl.io._

import cats.effect.IO
import cats.effect.kernel.Resource

import feral.functions.IOAzureHttpFunction
import feral.functions.facade.Context

object feralEX extends IOAzureHttpFunction {
  override def handler: Context => Resource[IO,HttpApp[IO]] = {
    context => {
      val app = HttpRoutes
        .of[IO] {
          case GET -> Root / "api" / "hello" / name =>
            context.log("Log Message.")
            Ok(s"Hello, $name.")
        }
        .orNotFound

      Resource.pure(app)
    }
  }
}

Azure resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant