title: How to determine System Environment Variables with RequireJS
body: <p>When developing client-side applications in the past I have always used some sort of server-side application to package and serve the JavaScript.  This allowed me to pass environment variables through to the client that varied between production and development environments.</p>
  
  <p>I'm working on a pure client-side application using RequireJS and serving it with a static web server.  Some configuration varies depending on whether the app is being run locally in development or in production (i.e. the URL of the server to which it will make AJAX requests).</p>
  
  <p>What's the best way to determine the current environment with RequireJS?</p>