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

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

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 Scalar. This can be configured via the scalar property.

Read more

See the @effect/platform HTTP API docs for detailed information on how to build an HTTP API with Effect.

Last updated