Skip to content

Instantly share code, notes, and snippets.

@tadeaspetak
Created January 30, 2022 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadeaspetak/7f9ea8b2529d90cf30c8c94e39a772f4 to your computer and use it in GitHub Desktop.
Save tadeaspetak/7f9ea8b2529d90cf30c8c94e39a772f4 to your computer and use it in GitHub Desktop.
const http = require("http");
const url = require("url");
http
.createServer(function (req, res) {
const params = url.parse(req.url, true).query;
res.write(
`<html>Searching for <strong>${params.search}</strong>.<br/>Results: ...</html>`
);
res.end();
})
.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment