An open API service indexing awesome lists of open source software.

https://github.com/dhaiwat10/rlp-proxy

The proxy used by @dhaiwat10/react-link-preview to fetch metadata for URLs.
https://github.com/dhaiwat10/rlp-proxy

Last synced: 2 months ago
JSON representation

The proxy used by @dhaiwat10/react-link-preview to fetch metadata for URLs.

Awesome Lists containing this project

README

        

# rlp-proxy

This is the source code for the proxy used in react-link-preview.

Feel free to fork both the main package and this proxy and deploy your own copy of the project.

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

## Important note
The `master` branch version of the proxy requires Redis & Supabase for rate-limiting & caching purposes. If you don't want these features, please switch to the [`no-redis-caching`](https://github.com/Dhaiwat10/rlp-proxy/tree/no-redis-caching) branch and use the code residing there.

## Environment variables & pre-requisites

1. `SERVER_URL`: The URL where your server is runnning (used for serving static files). For example, if you are running the server locally it will be `localhost:3000` and if your server is live at `abc.xyz`, the value for this variable will be `abc.xyz`. This variable is necessary to serve static files correctly.
2. `SUPABASE_KEY`: Your Supabase project's anon key. This proxy uses Supabase to cache query results. You will need to (i) Create a new project on [Supabase](https://app.supabase.io), (ii) Create a new table called `meta-cache` and create the following columns: `url` (text), `title` (text), `description` (text), `siteName` (text), `image` (text), `hostname` (text).
3. Redis. If you're deploying to Heroku, you can use the [Redis To Go](https://elements.heroku.com/addons/redistogo) add-on.