shorten
shorten copied to clipboard
A public url shortener โค๏ธ ๐ ๐๏ธ.
FormKit Url Shortener ๐๏ธ
This is a public url shortener built with UnJSโs excellent Nitro server server. Anyone is welcome to use it free of charge โค๏ธ. You can use it to shorten any url, and in general we (the FormKit team) will try to keep these short urlโs alive.
Usage
To shorten a URL perform a post request to https://formk.it
with the url youโd like to shorten in the body (this can be plain text or a JSON object with a "url" property):
curl -X POST -d "https://www.youtube.com/watch?v=10q09MMqU9E" https://www.formk.it
# https://formk.it/b4fa31ffi2xzf3fmv02czq0
Your own shortener
You can of course run your own shortener, and we encourage you to do so.
npx giget@latest gh:formkit/shorten my-shortener-app
Youโll need to provide your own Nitro storage adapter credentials (we use Vercelโs KV store)
// nitro.config.ts
export default defineNitroConfig({
storage: {
kv: {
driver: "vercelKV", // ๐ your storage adapter
},
},
});
Finally use a .env
file with the appropriate environment variables for your adapter.
Notice
If you chose to use the formk.it
public shortener, please be aware that we cannot guarantee the longevity of the short urls. We will try to keep them alive, but we may need to remove them at any time. If you need a short url that will never change, please run your own shortener.