refactored server/app.js

- moved environment variables to functions/environment.js
- moved route definition expressions to functions/route.js
- commented the code