This work is produced by John Häggerud for the course Server-based Web Programming (1DV023/1DV523) at Linnaeus University.
All content in this work excluding photographs, icons, picture of course litterature and Linnaeus University logotype and symbol, is licensied under a
Creative Commons Attribution 4.0 International License.
If you change the content do not use the photographs, icons, picture of the course literature or Linnaeus University logotype and symbol in your new work!
At all times you must give credit to: ”Linnaeus university – Server-based Web Programming (1DV023)” with the link https://coursepress.lnu.se/kurs/serverbaserad-webbprogrammering/ and to the Creative Common-license above.
A server is a computer program that provides services to other computer programs (and their users).
const http = require('http');
const PORT = 8080;
http.createServer((req, res) => {
res.writeHead(200);
res.end('Hello world\n');
}).listen(PORT);
What happens when you enter an URL in your browser and press enter?
How does the web server get and understand the request?
What is the IP-address of lnu.se?