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
If you'd like to mount an Effect HTTP API to a subpath, you must be sure that your API is prefixed with the same subpath, as this will not (yet) be done automatically for you. The easiest way to do this right now is myApi.prefix("my-subpath").
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