Mickaël LTOriginal post
Rank 2: Process
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 ?
Summary
There is a function example in Deno provided at this link: https://github.com/Meldiron/tmstats/blob/master/backend/functions/nadeoAction/src/test.ts. The example involves creating a test file that imports the function's entry point and executes it using fake request and response objects. The response is logged to the console. If you want to test your function before deployment, you can follow this example.