HTTP APIs

Confect allows you to use Effect to build your Convex HTTP API(s).

Usage

1. Define your HTTP API

https://github.com/rjdellecese/confect/blob/main/example/convex/http/api.ts

2. Make a Convex HTTP router

circle-info

You can mount your Effect HTTP API to the root path of your Convex site URLarrow-up-right, or to any subpath. You can even mount multiple Effect HTTP APIs to different subpaths!

circle-exclamation
https://github.com/rjdellecese/confect/blob/main/example/convex/http.ts

OpenAPI Documentation

Each Effect HTTP API will be accompanied by its own live OpenAPI documentation page, powered by Scalararrow-up-right. This can be configured via the scalar property.

Read more

See the @effect/platform HTTP API docsarrow-up-right for detailed information on how to build an HTTP API with Effect.

Last updated