Advertisement
Guest User

Untitled

a guest
Oct 1st, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. var http = require("http");
  2.  
  3. http.createServer(function (request, response) {
  4.  
  5. // Send the HTTP header
  6. // HTTP Status: 200 : OK
  7. // Content Type: text/plain
  8. response.writeHead(200, {'Content-Type': 'text/plain'});
  9.  
  10. // Send the response body as "Hello World"
  11. response.end('Hello Worldn');
  12. }).listen(8081);
  13.  
  14. // Console will print the message
  15. console.log('Server running at http://127.0.0.1:8081/');
  16.  
  17. var http = require("http");
  18.  
  19. http.createServer(function (request, response) {
  20.  
  21. // Send the HTTP header
  22. // // HTTP Status: 200 : OK
  23. // // Content Type: text/plain
  24. // response.writeHead(200, {'Content-Type': 'text/plain'});
  25. //
  26. // // Send the response body as "Hello World"
  27. // response.end('Hello Worldn');
  28. // }).listen(8081);
  29. //
  30. // // Console will print the message
  31. // console.log('Server running at http://127.0.0.1:8081/');
  32. //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement