This is a NodeJS server that generates a link preview based on information in the head of the link html.
The server expects a post request with a JSON body in the form:
{"url" : "https://example.com"}
It returns json with the link preview data in the form:
{
"title": "Example page",
"description": "This is an example page",
"image": "https://example.com/img/image.png",
"domain": "example.com",
"url": "https://example.com"
}
Note, this is a simple http server. If you want it to respond to secure https requests, then you'll either need to modify the server code, see e.g. How to create an https server?, or put the node server behind a reverse proxy, see e.g. NGINX Reverse Proxy.