Skip to content

Commit

Permalink
Add back semicolons to the HTTP server example in about page
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Apr 18, 2016
1 parent bde1ec6 commit 2d664b2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions locale/en/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ connections can be handled concurrently. Upon each connection the callback is
fired, but if there is no work to be done Node is sleeping.

```javascript
const http = require('http')
const http = require('http');

const hostname = '127.0.0.1'
const port = 3000
const hostname = '127.0.0.1';
const port = 3000;

const server = http.createServer((req, res) => {
res.statusCode = 200
res.setHeader('Content-Type', 'text/plain')
res.end('Hello World\n')
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
})

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`)
})
console.log(`Server running at http://${hostname}:${port}/`);
});
```

This is in contrast to today's more common concurrency model where OS threads
Expand Down

0 comments on commit 2d664b2

Please sign in to comment.