Back

Functions for Dev Environment

  • 0
  • Functions
  • Cloud
jonericcook
16 Aug, 2024, 21:01

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.
Steven
16 Aug, 2024, 21:59

sure. maybe 2 functions. 1 for dev and another for prod

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more