Skip to content

Instantly share code, notes, and snippets.

@lazywithclass
Created September 28, 2016 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lazywithclass/35069179cd23da46048dd3885a6d0fcc to your computer and use it in GitHub Desktop.
Save lazywithclass/35069179cd23da46048dd3885a6d0fcc to your computer and use it in GitHub Desktop.
var app = require('express')();
var env = {};
app.get('/set', function (req, res) {
var query = req.query, key = Object.keys(query)[0];
env[key] = query[key];
res.sendStatus(200);
});
app.get('/get', function (req, res) {
var key = req.query.key;
res.status(200).send(env[key]);
});
app.listen(4000, function () {
console.log('listening on 4000');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment