Hi, I want to debug the appwrite functions before deploying it.. how do i test it locally?
The best way is probably testing them by directly deploying them
complex functions are requried to be tested before
You can have a separate instance to test it
I mean, a local instance in your computer and then you deploy them to your final publicly available instance, for example, Appwrite cloud
Not sure if there's another way to debug/test functions without deploying them in any instance
but thats not a good way to test.. is there anyway to test the node version of cloud function to test locally direct like executing a js function
Why not, I think I didn't explained it well. You have an instance installed in your computer, and you test and deploy the function in such instance firstly to test it. Then after testing, you deploy it to the final/production instance
Maybe with open runtimes you could do some test
Hi, since you did not mention SDK, I am going to drop some relevant links for better understanding
You can try an open runtimes container as well if you are seeking a different method https://github.com/open-runtimes/open-runtimes/tree/main/runtimes/node-18.0
(please see for your own desired runtime)
He mentioned: node SDK
For production test the best would be as @D5 said.
For local testing, you might also want to upvote this https://github.com/appwrite/appwrite/issues/5425 And you can see here some example for how to https://github.com/byawitz/roadmapper/blob/main/functions/getGitFeatures/local-server.js
In general using that file will let you to mimic the OpenRuntime environment
i guess this is what i wanted thanks... it will be easy to run the local-server.js to test first and then deploy
sorry, might have missed that : )
Recommended threads
- Feedback and Deployment Challenges with ...
Hello world!, I've been developing a project using FastAPI in Python, and I was considering deploying it through Appwrite Functions. However, I encountered a f...
- Bulk feature status
Hi there, I am using version 1.7.4 self hosted and wanted to use the bulk operations in a dart function. I saw that in the dart_appwrite sdk version 16.1.0 it ...
- CORS preflight returns 500 on Dart funct...
Hey everyone 👋 I’m running a Dart cloud function, Every time I respond to a preflight (OPTIONS) request, I get a 500 internal error, and the logs show: ```NoSu...