Rank 1: Thread
Yes correct,
Votes
2
Replies
24
Participants
Unknown
Messages
25
Rank 1: Thread
Yes correct,
Rank 1: Thread
I want to test it from postman
Rank 1: Thread
Without deploy to server
Rank 1: Thread
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
Rank 2: Process
@ropi95 It's pretty easy, you can run any runtime server and export your functionality.
Rank 2: Process
Then you can test your function through postman.
Sorry, could you please explain what you mean by this?
Rank 2: Process
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”
Rank 2: Process
@ideclon @ropi95 @Runpace
it may be useful to you
https://github.com/ekamalov/bun-debug.git
you can debug your code, use breakpoints.
Rank 2: Process
open via vscode, run code
Rank 2: Process
don't forget to add header
x-open-runtimes-secret
Rank 2: Process
this fully meets the requirements of the runtime
Rank 2: Process
but I'm seeing some problems with the BUN, you can use other runtimes.
Rank 2: Process
we discuss the problem here https://discord.com/channels/564160730845151244/1191788381999468685
Rank 2: Process
breakpoint
I don’t see where you’re exposing a web server here?
Rank 2: Process
sorry check now, i added server
Rank 2: Process
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.