Uh oh!
There was an error while loading. Please reload this page.
Update code sample on about page with ES6 features - #381
Conversation
fhemberger
commented
Nov 26, 2015
Nice, LGTM |
rvagg
commented
Nov 26, 2015
maybe it's time to do a proper job and introduce template strings at the same time? consthttp=require('http');http.createServer((req,res)=>{res.writeHead(200,{'Content-Type': 'text/plain'});res.end('Hello World\n');}).listen(1337,'127.0.0.1',function(){console.log(`Server running at http://${this.address().address}:${this.address().port}/`);});or is that too complicated? |
fhemberger
commented
Nov 26, 2015
@rvagg Good point! Maybe add: constconnection=this.address();console.log(`Server running at http://${connection.address}:${connection.port}/`); |
ghost
commented
Nov 26, 2015
LGTM, regarding the complexity, maybe link to the ES6 page right below the code block? something like |
Chris911
commented
Nov 26, 2015
@rvagg, @fhemberger, I can make the change the add the template string but personally I think it adds complexity by using consthttp=require('http');constHOSTNAME='127.0.0.1';constPORT=1337;http.createServer((req,res)=>{res.writeHead(200,{'Content-Type': 'text/plain'});res.end('Hello World\n');}).listen(PORT,HOSTNAME,function(){console.log(`Server running at http://${HOSTNAME}:${PORT}/`);});This also matches the terminology used in the |
fhemberger
commented
Nov 26, 2015
@Chris911 Good idea, let's settle for this. |
1c7460c to
47bd40eCompareChris911
commented
Nov 26, 2015
@fhemberger updated. |
stevemao
commented
Nov 27, 2015
👍 |
There was a problem hiding this comment.
Last nitpick, use arrow function on this callback aswell?
rvagg
commented
Nov 27, 2015
I'd vote for lower-case variable names, there's inconsistency in |
Chris911
commented
Nov 27, 2015
Fine with me @rvagg. |
47bd40e to
7eb2b1bCompareChris911
commented
Nov 27, 2015
Updated. |
Update code sample on about page with ES6 features
phillipj
commented
Nov 27, 2015
Nice 👍 |
Small update on the about page to use ES6 features in code sample supported on on Node latest.
Looks like:
