Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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