Skip to main content
Inspiring
April 20, 2009
Answered

Production and Development servers

  • April 20, 2009
  • 1 reply
  • 1053 views

Hi,

I am looking for input on how some of you may handle this situation. I have a production and a development server for the obvious reasons. But what I would like to do is have a dynamic way for the application to tell what server it is on. For instance, during development/testing there will be "fake" cases built that only the test group needs to be aware of and as an example the system will email the "fake" results to my test team so that they can see what is happening on the test side. But, once I implement and move everything to production the test rules no longer apply. As it is now, I manually make the switches in code manually between test and production scenarios. What I would like acheive is the application to just "know" what to do based on the server it is running from. I know I could write some code to look at the URL to distinguish the difference, but I dont like that idea. I would like a solution that would perform more at the system level. Any ideas?

This topic has been closed for replies.
Correct answer Dan_Bracuk

application.cfc or cfm will give you the most bang for your buck.  Don't make it a local varible though.  Put it in the application or session scope

1 reply

Inspiring
April 20, 2009

You'll have to write some if/else code on something.  server.name is a good candiate.

We took it one step further.  We have a server variable effectively called isProduction.  We use this variable in our code, in case we have to change servers for some reason.

rmorganAuthor
Inspiring
April 20, 2009

Sounds feasible.