Skip to content

Instantly share code, notes, and snippets.

@RichFromGalvanize
Created June 9, 2013 23:34
Show Gist options
  • Save RichFromGalvanize/5745707 to your computer and use it in GitHub Desktop.
Save RichFromGalvanize/5745707 to your computer and use it in GitHub Desktop.
Print Environment Variables for a node Express application.
var express = require('express'),
app = express();
app.get('/', function(req, res) {
res.contentType('application/json');
res.send(process.env);
});
app.listen(process.env.PORT);
{
"name": "PrintEnv",
"version": "0.0.1",
"description": "Displays environment variables.",
"author": "Brandon Cannaday",
"dependencies": {
"express" : "3.1.x"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment