From 035743723d90d32f7c68489fe263b771c7349be6 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 31 Aug 2017 09:14:47 -0700 Subject: [PATCH] add PORT envvar to nodejs example --- examples/{javascript => nodejs}/index.js | 2 +- examples/{javascript => nodejs}/package.json | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename examples/{javascript => nodejs}/index.js (89%) rename examples/{javascript => nodejs}/package.json (100%) diff --git a/examples/javascript/index.js b/examples/nodejs/index.js similarity index 89% rename from examples/javascript/index.js rename to examples/nodejs/index.js index ce840df..3f38290 100644 --- a/examples/javascript/index.js +++ b/examples/nodejs/index.js @@ -1,5 +1,5 @@ const http = require('http'); -const port = 8080; +const port = process.env.PORT || 8080; const requestHandler = (request, response) => { console.log(request.url); diff --git a/examples/javascript/package.json b/examples/nodejs/package.json similarity index 100% rename from examples/javascript/package.json rename to examples/nodejs/package.json