I've been working a lot with node.js recently, and hosting my projects on AppFog. One problem that's been bugging me is switching between localhost and pushing live with ease. Is there a way I can change port and database information based on the context of the project without manually changing them every time? I guess this is a project management question.
server.listen(process.env.VMC_APP_PORT || 1337, null); //for AppFog
server.listen(8080); //for localhost