Hello, What is the advised way of having different environments (prod and dev) when it comes to functions? I know the main way for user auth is to have an entirely different project. I read in the docs that functions' code can live in a git repo and whenever new code is merged to main the function is updated to that code. Can I have a dev branch be used for my dev project and then main be used for production?
TL;DR
Functions for Dev Environment:
To have different environments for functions (development and production), you can utilize two separate functions - one for dev and one for prod. You can store the functions' code in a git repo and have a dev branch for development and main branch for production. This way, merging new code to the main branch will update the production function while keeping the dev function separate.sure. maybe 2 functions. 1 for dev and another for prod
Recommended threads
- Unable to deploy site
I am on a new project where i want to deploy a new site, but what ever i'am trying - i get this error, and thats if i manually deploy with gz file 5.4kb or thro...
- Unexpected site limit
i am getting no. of site limits eve though i dont have any site deployed currently
- website is down