Status
Loading...|
johndoe@admin: ~
JJ-Art-Göttingen: ~ $
Create an HTTP Server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// server.mjs
import { createServer } from 'node:http';

const server = createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('Hello World!\n');
});

// starts a simple http server locally on port 3000
server.listen(3000, '127.0.0.1', () => {
  console.log('Listening on 127.0.0.1:3000');
});

// run with `node server.mjs`

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Modi laboriosam at voluptas minus culpa deserunt delectus sapiente inventore pariatur

+
+
+
+
90
2x30min
+
JJ ART
GÖTTINGEN
JJ Art Connect