3 ms·
I always write a remote function as just "an async function that takes type A and returns type B" - then I can write tests for it very easily and run it locally
by xsmasher 4y ago
I always write a remote function as just "an async function that takes type A and returns type B" - then I can write tests for it very easily and run it locally, IF it doesn't use any AWS services like databases.
For deployment I have a generic "wrapper" that makes it lambda-compatible by converting a webEvent -> Json and my outputJSON -> web response event.