Skip to content

Instantly share code, notes, and snippets.

@SeongJuMoon
Created August 26, 2020 08:59
Show Gist options
  • Select an option

  • Save SeongJuMoon/d289e28575daa83576cca816a5e05880 to your computer and use it in GitHub Desktop.

Select an option

Save SeongJuMoon/d289e28575daa83576cca816a5e05880 to your computer and use it in GitHub Desktop.
const http = require('http');
const envWriter = (res) => {
for (const item in process.env) {
res.write(`${item} = ${process.env[item]}\n`);
}
};
http.createServer((req, res) => {
res.writeHead(200);
res.write("hellod");
envWriter(res);
res.end();
}).listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment