will smith
will smith
CDCloudflare Developers
Created by will smith on 3/31/2025 in #workers-help
Replacements for pages _headers and _redirects
Ok thanks a lot. Looks like react router hasn't shipped their wrangler v4 update yet, will have another try at upgrading once this is released https://github.com/remix-run/react-router/pull/13258
6 replies
CDCloudflare Developers
Created by will smith on 3/31/2025 in #workers-help
Replacements for pages _headers and _redirects
Huh ok thank you.. So they mustn't be copying correctly into my build dir, right?
6 replies
CDCloudflare Developers
Created by will smith on 3/16/2025 in #d1-database
status dashboard says no, but just for
db id 3d4f24ec-fa8d-4920-82b2-179fad18b18c
4 replies
CDCloudflare Developers
Created by flowwise on 3/17/2025 in #d1-database
was anyone able to use Prisma + D1? My
yes, prisma+d1 is my favourite setup lately. just cloned one of my private repos so you can see a working example https://github.com/WillSmithTE/trafficlights-public-clone
2 replies
CDCloudflare Developers
Created by will smith on 3/16/2025 in #d1-database
status dashboard says no, but just for
No description
4 replies
CDCloudflare Developers
Created by will smith on 3/16/2025 in #d1-database
status dashboard says no, but just for
seeing recovery now but would be great to get acknowledgement of an issue once you know more
4 replies
CDCloudflare Developers
Created by will smith on 3/16/2025 in #d1-database
status dashboard says no, but just for
This is not a large db, 65 kB. Now got an error log: PrismaClientUnknownRequestError: Invalid prisma.goal.findMany() invocation: Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(SqliteError { extended_code: 1, message: Some("D1_ERROR: Network connection lost.") }), transient: false }) So i'm guessing the issue's not on my end
4 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
Ok so i do have to duplicate the setup
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
Here's my usecase: Personal finance tracker where user uploads transactions by CSV. When they upload, we return "ok" and start processing them in the background in batches. If the worker dies, errors, whatever, there are unprocessed transactions. I have a cron job (github action) to ping the server to find unprocessed transactions and process them. To me this seems like a perfect usecase for workflows. Ideally I'd copy-paste the processing logic into a workflow. When a user makes an upload, I'll just do something like trigger({userId: 'abc', timestamp: 1740151053}). The workflow finds unprocessed transactions created before that timestamp and processes them.
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
If you're using Pages, it must be in a separate service.
My workflow must be in a separate service right? So to do anything server-related don't I need the same server-related stuff that's already in my pages app? e.g. DB credentials, email template, types. To be clear, today I have a remix pages app. What I'm understanding is I can't add workflows to my service, so the recommendation is deploy a separate service with the workflow and call that from my existing service.
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
Fair enough. Just my feedback as a user, it doesn't seem like I should keep on pages long-term. I was already missing out on cron triggers, and now this. Calling a separate app (duplicating my backend setup into a different worker) is a non-starter for my projects. I'm not saying Cloudflare is forcing me to migrate off, but if I want the new goodies, it sounds like I should.
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
The Pages binding is fairly straightforward though + you don’t need to “maintain” it.
To make sure I'm not misunderstanding, this is deploying the separate workers service with your workflow and calling it from pages right? Not solving the problem I mentioned where all my backend code is already in my pages app? Want to make sure I'm not missing something
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
Ah ok. Can I bank on using 1 service in the future with the converging of workers and pages? Should I be getting off pages altogether eventually?
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
thanks for the help. @Matt I'm not looking to put it in a different worker, I want access to all the same stuff in my server (db, email-sending, types etc.). How can I keep the workflow in the same service?
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
It's also highly possible I'm doing it wrong, trying to follow this: https://developers.cloudflare.com/workflows/build/call-workflows-from-pages/
20 replies
CDCloudflare Developers
Created by will smith on 2/7/2025 in #workflows-beta
is `npx wrangler types` supposed to work
It feels like the guides are super targeted at going from scratch. I'm adding them into my remix app on pages
20 replies