Yes correct,
I want to test it from postman
Without deploy to server
And debug locally
Honestly, I usually just push my Function to Appwrite and run, then fix and push again, etc. Pushing Functions to Appwrite is so simple and fast that I don’t really see the point in attempting to run outside Appwrite, where you won’t be in exactly the same environment you’ll be in in production.
If you do really want to run the Functions locally, I can explain how to - what runtime?
I think you are not able to test it via postman without deploying at least not that easy, yet you can basically remove context from your function and run it like normal script and add your own debug logs instead of context logs.
It is possible, just probably unnecessarily complicated
@ropi95 It's pretty easy, you can run any runtime server and export your functionality.
Then you can test your function through postman.
Sorry, could you please explain what you mean by this?
It's the middle of the night right now, tomorrow morning I'll do an approximate project and show you.
Just wondering what you mean by “run a runtime server”
And “export your functionality”
@ideclon @ropi95 @Runpace it may be useful to you https://github.com/ekamalov/bun-debug.git
you can debug your code, use breakpoints.
open via vscode, run code
don't forget to add header
x-open-runtimes-secret
this fully meets the requirements of the runtime
but I'm seeing some problems with the BUN, you can use other runtimes.
we discuss the problem here https://discord.com/channels/564160730845151244/1191788381999468685
breakpoint
I don’t see where you’re exposing a web server here?
sorry check now, i added server
You got that from here, right?
But while this would be ok for basic debugging, you’re still not in the same environment you’ll be in when you ultimately deploy to Appwrite. If you’re going to do this locally, I’d say it would be better to spin up the correct open-runtimes container, and build exactly like Appwrite would.
Recommended threads
- RowList: The value of total is coming as...
RowList: The value of total is coming as a String, so it throws an error because it’s not parsed into an int. Error: TypeError: \"37\": type 'String' is not a ...
- 408 Timeout / Curl Error 7 in Executor w...
Hey everyone, I am losing my mind over a routing loop/timeout issue on a fresh self-hosted setup. I have a single Linux VPS (IP: 45.141.37.105) and one domain (...
- functions returning error 401 in local
I updated to 1.9.0, and the functions that used to work fine in 1.8.1 are now giving me a 401 error. I can't seem to find a solution. If anyone is running versi...