-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remix proxy #58
Comments
i second this request |
Cool! It's good to know there's some interest in Remix support. I'll pick it back up as soon as possible. |
try this
|
We added remix-run support in the proxy v0.9.0, which was just released! See PR #82 for details. The simplest use-case is to just re-export the proxy route handler:
import { createProxy } from "@fal-ai/serverless-proxy/remix";
import { json } from "@remix-run/node"; // or cloudflare, deno
const proxy = createProxy({
json
});
// just re-exporting, but you can create your own logic by providing you own function
// and then calling to proxy.action(req) or proxy.loader(req)
export const { action, loader } = proxy; Then in the client-side, you can setup the client to proxy calls via your route handler:
fal.config({
proxyUrl: "/api/fal/proxy",
}); |
Closing this issue as it's been resolved. Feel free to reach out if you have any other issues or feedback. |
It would be great to have a Remix proxy in the lib!
I've tried to use the open branch feature/remix-proxy , but didn't manage to get it to work.
Please revive and merge it for us Remix fans ,
Thanks!
The text was updated successfully, but these errors were encountered: