A simple link shortener implementation designed to be self hosted or deployed to vercel.
- SECRET_APP_ACCESS => The access key you wish to use in order to add and delete links (treat this like a password).
- SECRET_KV_URL => Value from KV_REST_API_URL.
- SECRET_KV_TOKEN => Value from KV_REST_API_TOKEN.
- PUBLIC_SITE_URL => The URL where the shortener will be at, without 'https://' or trailing slash (eg. simpleshortener-svelte.vercel.app)
Note: It's recommended to switch the adapter to Vercel's for better customizability.
(Self-hosting on your own hardware requires knowledge to expose machine to the internet)
To create a production version of your app in case you wish to self host it:
npm run build
For the key-value storage, the project uses a Redis API based key-value database.
Redis servers are available on most cloud platforms and can be hosted by yourself (Requires knowledge to expose machine to the internet). But you may opt for Upstash if you prefer free.
You will also need to set up some env variables for API's and access
- SECRET_APP_ACCESS => The access key you wish to use in order to add and delete links (treat this like a password).
- SECRET_KV_URL => The https url to the kv database
- SECRET_KV_TOKEN => The read_write token to the kv datavase
- PUBLIC_SITE_URL => The URL where the shortener will be at, without 'https://' or trailing slash (eg. simpleshortener-svelte.vercel.app)