Skip to content

Commit ce5a76e

Browse files
Merge pull request #1302 from jihdeh/patch-1
Update nodeJS code to supported es6 version LTS
2 parents 00b8dca + 60df824 commit ce5a76e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/hellonode.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ The first step is to write the application. Save this code in a folder called "`
5959
#### server.js
6060

6161
```javascript
62-
var http = require('http');
63-
var handleRequest = function(request, response) {
62+
const http = require('http');
63+
const handleRequest = (request, response) => {
6464
console.log('Received request for URL: ' + request.url);
6565
response.writeHead(200);
6666
response.end('Hello World!');
6767
};
68-
var www = http.createServer(handleRequest);
68+
const www = http.createServer(handleRequest);
6969
www.listen(8080);
7070
```
7171

@@ -88,7 +88,7 @@ Next, create a file, also within `hellonode/` named `Dockerfile`. A Dockerfile d
8888
#### Dockerfile
8989

9090
```conf
91-
FROM node:4.4
91+
FROM node:4.5
9292
EXPOSE 8080
9393
COPY server.js .
9494
CMD node server.js

0 commit comments

Comments
 (0)