Managing Dev, Staging, and Prod Environments as a Solo Developer

0
2
Asked By SoloDevGamer99 On

I've been developing a full stack app at work that gets about 30 users daily. Initially, I was using a dev/prod setup on my desktop, pushing to an online repository so users could access the stable version while I worked on the development version. Now that I finally have a dev server set up, I've started configuring it and cloning the repository. The one issue I'm facing is that the dev server requires proxy credentials for external API calls. My question is, how do I handle the staging and production servers, which shouldn't need this proxy code? Do I need to have them bypass the proxy entirely, or is there a better approach?

1 Answer

Answered By CodeNinja42 On

Using environment variables is a solid approach! You can set up your dev server to connect with the proxy credentials via env variables. That way, your staging and prod environments can be configured without those credentials since they won't require the proxy.

DevJourney88 -

That sounds good, but wouldn't it create a code issue for the production environment where the proxy shouldn't be used? It feels like I'd have to maintain different backend code for each environment. Am I overcomplicating this?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.