Fork me on GitHub
#biff
<
2024-05-13
>
gtbono02:05:52

is it possible to use biff to do an api-only application? is it right? or should I use something else? 😅

Jacob O'Bryant03:05:01

you can do that 👍 FYI there might be rough edges because I haven't used biff for that use-case myself; basically you might have to fiddle around with the middleware. but in general should be fine! probably also are some parts you can take out, E.g. obviously no need for tailwind--you could copy-paste the dev command into your project and modify it so it doesn't run tailwind compilation. that kind of thing.

Jacob O'Bryant03:05:52

(also I think there is plenty of stuff in biff that would make it handy even for an api-only service--the dev/production tooling, the glue code for reitit+XTDB, ...)

Lyn Headley19:05:47

I think it would be great for this

Lyn Headley19:05:52

I love how pull expressions are first class. I have all my pull expressions in a single file and I pass them as parameters to lookups. Makes it so easy to write pull expressions because all the examples are right there.

🙌 2
Lyn Headley19:05:07

today I learned that stripe webhooks should return right away without querying the db. so I reached for biff queues. boom. right in the sweet spot.

Jacob O'Bryant20:05:48

interesting, did not know that

Robert Todea03:05:49

@UDF1WUJTH what do you mean by querying the db ? Do you mean your DB? Are you saying that you want the webhook call (Stripe -> your API) to return as soon as possible?

jf17:05:40

Just as a note (I looked it up since I was curious): https://docs.stripe.com/webhooks : "quickly return(|s) a successful status code (2xx) prior to any complex logic"

👌 1