Skip to content

Instantly share code, notes, and snippets.

@rasolofonirina
Last active March 25, 2022 12:43
Show Gist options
  • Save rasolofonirina/c0c34e3af2b31f69990953363fb09382 to your computer and use it in GitHub Desktop.
Save rasolofonirina/c0c34e3af2b31f69990953363fb09382 to your computer and use it in GitHub Desktop.
Basic server with HTML
const http = require('http')
const server = http.createServer((req, res) => {
res.writeHead(200, {"Content-Type": "text/html"})
res.end('<h1>Hi everybody !</h1>')
})
server.listen(8080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment