Hacker News new | ask | show | jobs
by spion 966 days ago
How do you version the functions? How does the server determine which function to call? Does it use the name of the function, or its source code file, or something else? If I rename the old version and call it `actionOld` while the new version is `action` will it know how to call the old one, or do I need to do the opposite (call it `actionNew`)? What if I move the old one to a different file?
1 comments

You can use a v1 folder for your v1 functions. The server identifies functions by path and name of the action. Similar to a url. So like a url if you want a new one, you'd create actionNew, and if you move the location of the function it would break old versions without a redirect.
Is this documented anywhere?