ripRigPanic
CDCloudflare Developers
•Created by ripRigPanic on 2/11/2024 in #workers-help
Specifying multiple content-types in itty-router-openapi responses
I'm looking to return response content-type conditional on request accept header. OpenAPI spec has an example https://swagger.io/docs/specification/describing-responses/
but I can't find a way to accomplish that with itty-router-openapi response format. I tried something like
but it seems that the object with the status code key must satisfy
Is there a way to specify multiple content types there?
1 replies
CDCloudflare Developers
•Created by ripRigPanic on 2/5/2024 in #workers-help
Workers with Postgres - recommended ways?
There are a number of ways to connect to Postgres from workers. I wonder what are pros and cons of each.
1. https://developers.cloudflare.com/hyperdrive/
2. https://developers.cloudflare.com/workers/tutorials/postgres/ - requires old
node_compat
mode
3. Data API (for AWS RDS serverless Aurora v1 (and v2 now?)) - uses HTTP. I believe v1 has some scaling limitations and at least some of which are addressed in v2.
In our particular case we are using RDS for prod and staging/dev.2 replies