W
Wasp5w ago
matijash

Can I run Wasp on Cloudflare Workers?

It would be really cool.
7 Replies
kapa.ai
kapa.ai5w ago
Hi @matijash. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Short answer: not today. The docs and threads only cover deploying Wasp’s Node.js server to providers like Fly.io, Heroku, Railway, Netlify (for the static client), or manual/bare-metal/Docker setups. There’s no mention of Cloudflare Workers support, which runs on a different runtime model than Node.js (Wasp expects a Node server) (Deployment overview, Deploying with CLI, Deploying manually). You can still: - Host the static React client anywhere (including CF Pages), since it’s just static files after build (manual frontend deploy). - Run the backend on a Node-friendly host (e.g., Fly.io) and point the client to it (env vars and URLs). I’m sorry, but there’s no information about native Cloudflare Workers support in the knowledge sources. If you’re interested, we can track it as a feature request. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @matijash, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
isaiah
isaiah5w ago
Like the whole Wasp deployment? Maybe possible? It will be a pain though. I don't think you can also do heavy crypto with it? I tried to do password hashing with PBKDF2 SHA-256 600 000 iterations (OWASP recommendation). Worker threw an exception. Told me I can only do 100 000 iterations.
nodtem66
nodtem665w ago
They limit CPU time per request. If wasp can run within 30s, you can run it on Cloudflare worker. It would be impressive if it can, but that means another epic of optimizing wasp (and underlying ecosystem), which is good not only for Cloudflare worker but also for CI, testing, etc.
isaiah
isaiah5w ago
It's also another epic of making the packages that rely on Node APIs work on Cloudflare Workers's runtime workerd. I think they're a bit lenient when it comes to cryptography since I'm currently pushing past 10ms (I'm on Cloudflare Workers Pleb account)? And the worker will return Error 1102 if it did.
isaiah
isaiah5w ago
No description
martinsos
martinsos4w ago
@matijash dont' you work here :D. But yeah CWs are serverless, so the typical issues with those: Wasp is not made for running on serverless (yet).
matijash
matijashOP4w ago
I have questions too 😄

Did you find this page helpful?