0.0.4 • Published 2 years ago

link-preview-api v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

link-preview-api

Link preview API based on ospfranco/link-preview-js

Table of contents

Usage

curl -X POST 'http://localhost:3000/api/preview_link' \
	-H "Authorization: Bearer 123" \
	-H "content-type: application/json" \
	--data '{"link":"https://google.com/"}'

Setup

It can be installed either as Docker container or node application.

Configuration

To configure applcation, set environment variables.

PORT=3000 # Port to listen on
TOKEN=123 # Bearer token. Do not set if you do not want auth

Docker

docker run -ti -e PORT=3000 -e TOKEN=123 -p 3000:3000 nemanjan00/link-preview-api herokuish procfile start web

Yarn

yarn global add link-preview-api
link-preview-api

Authors