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.
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 branch and use the code residing there.
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 belocalhost:3000and if your server is live atabc.xyz, the value for this variable will beabc.xyz. This variable is necessary to serve static files correctly.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, (ii) Create a new table calledmeta-cacheand create the following columns:url(text),title(text),description(text),siteName(text),image(text),hostname(text).- Redis. If you're deploying to Heroku, you can use the Redis To Go add-on.