Node.js/w3schools: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with "== w3schools Tutorial == https://www.w3schools.com/nodejs")
 
No edit summary
 
Line 2: Line 2:


  https://www.w3schools.com/nodejs
  https://www.w3schools.com/nodejs
== Hello World ==
<pre>
var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!');
}).listen(8080);
</pre>

Latest revision as of 02:58, 30 January 2024

w3schools Tutorial

https://www.w3schools.com/nodejs

Hello World

var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!');
}).listen(8080);