Skip to content

Instantly share code, notes, and snippets.

@rasolofonirina
Last active March 25, 2022 12:35
Show Gist options
  • Save rasolofonirina/a5053ff401bcfd67f8c4720e1a401a6d to your computer and use it in GitHub Desktop.
Save rasolofonirina/a5053ff401bcfd67f8c4720e1a401a6d to your computer and use it in GitHub Desktop.
Test URL
const http = require('http')
const url = require('url')
const server = http.createServer((req, res) => {
const page = url.parse(req.url).pathname
console.log(page)
res.writeHead(200, {"Content-Type": "text/plain"})
res.write('Hello everybody !')
res.end()
})
server.listen(8080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment