How do I test http actions locally?
Hi, I'd like to test my http actions locally i.e. by making requests to localhost.
However when try and hit localhost:3000/myEndpoint, I'm getting 404s.
The endpoint works in production, so I'm wondering why I'm getting a 404 locally...
3 Replies
Convex functions, including webhooks, do not run locally (unless you're using convex open source). You can get the url for http actions in the convex dashboard (make sure to choose between the prod or dev deployment), and then hit it like
https://murky-swan-635.convex.site/myEndpoint
ah ok, that explains it - thank you! 👍
Docs for debugging HTTP actions (which are probably also useful for testing): https://docs.convex.dev/functions/http-actions#debugging
HTTP Actions | Convex Developer Hub
HTTP actions allow you to build an HTTP API right in Convex!