How to handle different environments in App Connect?

I have attempted to write a solution for php/apache here.