AkashRajpurohit / wormhole

☄️ Quickly transport yourself to the right URL

Home Page:https://q.akashrajpurohit.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Wormhole

Wormhole

Quickly transport yourself to the right URL

Bug report · Feature request

Deployed via Cloudflare Workers Visitors count follow on twitter GitHub

Wormhole is a URL redirection service that allows you to quickly share short, memorable links with others without worrying about configuring a go-url service.

My purpose of using this along with time-to-go is to extend blogs sharing capabilities without me needing to add each and every blog to the go-url service.

So instead of going to akashrajpurohit.com/blogs/ and then search for the blog there and then sharing the full length URL, I would be able to just share the URL using this service.

Example - https://q.akashrajpurohit.com/inhouse-newsletter will redirect user to https://akashrajpurohit.com/blog/i-built-my-own-inhouse-newsletter-system/

How it works? 🤔

Wormhole is a Cloudflare Worker that uses DuckDuckGo's bangs to redirect the user to the actual URL for a specific given domain.

As long as your query is in the format ! site:domain query it will redirect you to the actual URL.

Self Hosting Guide 📖

To self-host Wormhole, follow these steps:

Prerequisites 🏃🏻

  • 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.

Environment Variables 👀

Before deploying Wormhole, make sure to set the following environment variables:

For Github Actions ⛏

All of the tokens mentioned in this section are required.

  • CF_API_TOKEN: Your Cloudflare API token. Create the API tokens from here
  • CF_ACCOUNT_ID: The ID of the Cloudflare zone where you want to deploy Time to Go.

For Cloudflare Worker 👷🏼‍♂️

  • DOMAIN - This would be the domain you want your search to be associated with. For example if you want to search for ! site:example.com query then example.com would be the value for this variable.

  • FALLBACK_URL - This would be the full URL where you want to redirect the user if no query is provided. For example if you want to redirect the user to https://example.com then https://example.com would be the value for this variable.

Deployment 🚀

To deploy Time to Go, follow these steps:

  1. Fork this repository to your own GitHub account.
  2. Add the environment variables for the forked repository from the Github Actions section.
  3. Clone the forked repository to your local machine.
  4. Navigate to the repository directory.
  5. Install the dependencies by running the command: pnpm install.
  6. Edit the wrangler.toml file and update the values DOMAIN and FALLBACK_URL in the vars section.
  7. Commit your changes and push them to your forked repository.
  8. GitHub Actions will automatically trigger the deployment process. Wait for the action to complete.

Congratulations! Wormhole is now deployed and ready to use.

Technology Stack 💻

Bugs or Requests 🐛

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.

Credits 👨🏻‍💻

Where to find me? 👀

Website Badge Twitter Badge Linkedin Badge Instagram Badge Telegram Badge

About

☄️ Quickly transport yourself to the right URL

https://q.akashrajpurohit.com/

License:MIT License


Languages

Language:TypeScript 100.0%