Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 365 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 365 Bytes

// 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