Hi, What is the best way to create a function ? I've create a function with the cli, upload it to my server with the cli, it crash, I examine log, i fix, reupload, it run, etc. But If I want to test it before deploy how can I do that ? Any tips or best practice ?
Hi, @Meldiron has an example in Deno listed here: https://github.com/Meldiron/tmstats/blob/master/backend/functions/nadeoAction/src/test.ts. The idea is to have a test file that imports entrypoint of the function, and executes. It fakes req and res objects, providing test data for variables, payload.. Response is faked by printing into console.
Recommended threads
- After a GET request is passed to functio...
Create execution in the console can normally retrieve the get parameters。WHy?
- function subdomain ssl certs
The generated subdomain isn't getting a valid ssl cert, I was wondering if appwrite automatically generates one or uses a wildcard for *.functions.domain.com? ...
- Python Function Deployment hits General ...
The same deployment was working without issue yesterday and I have not hit any free tier limits yet. How do I figure out what's happening? Are you having issues...