Simplify and Supercharge Your Links!
Bug report
Β·
Feature request
Time to Go is a utility service built on top of Cloudflare Workers that allows you share Go URLs.
Read more about Go URLs by visiting this Go URL https://go.akashrajpurohit.com/b/go-urls
Have you ever wanted to share a long and complex URL with others, only to find it difficult to remember or share? Time to Go solves this problem by providing you with the ability to create short, personalized Go URLs that are easy to remember and share.
Whether you're sharing a link on social media or including it in a presentation, Time to Go simplifies the process and makes it more convenient for you and your audience.
To self-host Time to Go, follow these steps:
- Account with Cloudflare. Everything required for this is available on Free plan as well.
- Node.js installed on your machine if you want to run it locally first.
- PNPM - The package manager used.
To store the URL data, Time to Go utilizes Cloudflare's Key-Value (KV) store. Follow these steps to set up KV:
- Create a KV namespace in your Cloudflare account.
- Note down the generated KV namespace ID.
We will use the UI for KV to add/update go-urls. Simple add a key (the short code) and value as the actual URL and click on "Add Entry"
Go ahead and take some time to add some GO URLs for yourself.
Before deploying Time to Go, make sure to set the following environment variables:
All of the tokens mentioned in this section are required.
CF_API_TOKEN
: Your Cloudflare API token. Create the API tokens from hereCF_ACCOUNT_ID
: The ID of the Cloudflare zone where you want to deploy Time to Go.
-
NOT_FOUND_REDIRECT_URL
- This would be the URL where you want to re-direct a user when there is no go-url configured for incoming request.If this is not set then the service will just return a 404 response.
-
REFERRER_TEXT
- If set, this will get attached to the go-url as aref
key in the url.For example if
REFERRER_TEXT=my-ref
and the URL ishttps://example.com
it will be redirected tohttps://example.com?ref=my-ref
To deploy Time to Go, follow these steps:
- Fork this repository to your own GitHub account.
- Add the environment variables for the forked repository from the Github Actions section.
- Clone the forked repository to your local machine.
- Navigate to the repository directory.
- Install the dependencies by running the command:
pnpm install
. - Edit the
wrangler.toml
file and update the values forkv_namespaces
with the KV id we created earlier for bothid
andpreview_id
. - Update the
vars
section to add the environment variables from the Cloudflare worker section. - Commit your changes and push them to your forked repository.
- GitHub Actions will automatically trigger the deployment process. Wait for the action to complete.
Congratulations! Time to Go is now deployed and ready to use.
- Framework - Hono
- Deployment - Cloudflare Workers
- Storage - Workers KV
If you encounter any problems feel free to open an issue. If you feel the project is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull requests are also welcome.