# link-preview-api

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

Latest version **0.0.4** (published 2022-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install link-preview-api
pnpm add link-preview-api
yarn add link-preview-api
bun add link-preview-api
```

Provides the command `link-preview-api`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-05-27 |
| First published | 2022-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nemanja Nedeljkovic |
| Maintainers | nemanjan00 |

## Links

- npm: https://www.npmjs.com/package/link-preview-api
- Repository: git@github.com:nemanjan00/link-preview-api
- npm.io page: https://npm.io/package/link-preview-api

## Dependencies (6)

- [husky](https://npm.io/package/husky.md) ^4.3.6
- [morgan](https://npm.io/package/morgan.md) ^1.10.0
- [express](https://npm.io/package/express.md) ^4.18.1
- [forever](https://npm.io/package/forever.md) ^4.0.3
- [body-parser](https://npm.io/package/body-parser.md) ^1.20.0
- [link-preview-js](https://npm.io/package/link-preview-js.md) ^2.1.13

## Recent versions

- 0.0.4 (latest) — 2022-05-27
- 0.0.3 — 2022-05-09
- 0.0.2 — 2022-05-09
- 0.0.1 — 2022-05-09

## README

# link-preview-api



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

## Table of contents

<!-- vim-markdown-toc GFM -->

* [Usage](#usage)
* [Setup](#setup)
	* [Configuration](#configuration)
	* [Docker](#docker)
	* [Yarn](#yarn)
* [Authors](#authors)

<!-- vim-markdown-toc -->

## Usage

```bash
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.

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

### Docker

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

### Yarn

```bash
yarn global add link-preview-api
link-preview-api
```

## Authors

* [nemanjan00](https://github.com/nemanjan00)

---
_Source: https://npm.io/package/link-preview-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
