Skip to content

ZaninAndrea/linkPreview

Repository files navigation

Link preview microservice

This webserver renders a link preview by scraping the submitted link. screenshot

Usage

Make a GET request to the server https://linkpreviewer.herokuapp.com/ passing link (shortened urls are ok, e.g. https://goo.gl/epMmfm) and format (optional) in the URL query. Format can be either json or html, html by default.

E.g. https://linkpreviewer.herokuapp.com/?link=https://goo.gl/epMmfm&format=json returns

{
  "title": "The engineer’s guide to not making your app look awful",
  "description": "A problem that a lot of independent app developers face is that they aren’t graphic designers. I work with an innovation team where I have…",
  "image": "https://cdn-images-1.medium.com/max/1200/1*snMthttokp8m2AWo9dLN7A.jpeg"
}

Checkout a complete example here

Style

If you want to use the pre-rendered HTML you should copy this css, or add this row to your <head> tag:

<link rel="stylesheet" href="https://linkpreviewer.herokuapp.com/style.css">

Remix

You can remix this project on glitch

Remix on Glitch

About

A webserver rending link previews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published