Created
July 7, 2014 18:35
-
-
Save bcoe/a61bf22521dbc3813599 to your computer and use it in GitHub Desktop.
Proposal for environment extension to package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Problem: there are a class of packages on npm that are best described as "services", e.g., statsd, thumbd. | |
| // there is not a straight-forward, machine-readable, way to setup the necessary dependencies for these services. | |
| // | |
| // Solution: the various parties that are building tools for deploying these services (Heroku, Node OS, ndm) should agree | |
| // on a standard for programatically describing environment dependencies in the package.json. | |
| // | |
| // What Jacob and I came up with: | |
| { | |
| "name": "statsd", | |
| "dependencies": { | |
| "request": "^1.0.0" | |
| }, | |
| "environment": { | |
| "PORT": "8125", // Default value of 8125 for PORT, user could still choose to override. | |
| "GRAPHITE_HOST": { // Rather than simply a default value, environment can provide meta information. | |
| "default": "http://localhost:2004", // default value. | |
| "description": "Full URL of host that StatsD should feed its metrics to", // human readable description. | |
| "url": "https://www.hostedgraphite.com/" // URL of hosted solution, perhaps a Heroku AddOn? | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment