Skip to content

Commit

Permalink
doc: refine spaces in example from vm.md
Browse files Browse the repository at this point in the history
PR-URL: #13334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
vsemozhetbyt authored and jasnell committed Jun 5, 2017
1 parent 1bcda5e commit 3c55d1a
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,18 +442,17 @@ to the `http` module passed to it. For instance:
'use strict';
const vm = require('vm');

const code =
`(function(require) {
const code = `
(function(require) {
const http = require('http');
const http = require('http');
http.createServer((request, response) => {
response.writeHead(200, { 'Content-Type': 'text/plain' });
response.end('Hello World\\n');
}).listen(8124);
http.createServer( (request, response) => {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\\n');
}).listen(8124);
console.log('Server running at http://127.0.0.1:8124/');
})`;
console.log('Server running at http://127.0.0.1:8124/');
})`;

vm.runInThisContext(code)(require);
```
Expand Down

0 comments on commit 3c55d1a

Please sign in to comment.