etsy/statsd — pull request #301 by bcoe (2013-06-02 08:18:20+00:00)
Title: Configuration can now be loaded from ENV as well as from a configuration file

If you run stats.js without specifying a configuration file, configuration will be loaded from environment variables name-spaced with STATSD_:

```bash
STATSD_graphitePort=2003
STATSD_graphiteHost=carbon.hostedgraphite.com
STATSD_port=8125
STATSD_graphite_legacyNamespace=false
STATSD_graphite_globalPrefix=bananas
STATSD_flushInterval=5000
```

Creates

```javascript
{ graphitePort: 2003,
graphiteHost: 'carbon.hostedgraphite.com',
port: 8125,
graphite: {
legacyNamespace: false,
globalPrefix: 'bananas'
},
flushInterval: 1000
}
```

I tend to use foreman and a .env file to execute services, such as StatsD. This patch makes this option much more viable for me.