☁️ Simple link shortener for Cloudflare Workers®.
MIT License
The goal of this project is to create a lightweight and simple url shortener that simply runs on Cloudflare Workers® and is deployed by GitHub Actions. It uses the native Cloudflare Workers® SDK without any additional packreges to be as minimal and cheap as possible. Short provides a simple API to create and manage new links.
This is an explanation of how you can get your own instance of short up and running.
Before you get started, you need to have a few things ready:
[!CAUTION] When you fork the repository unselect "Copy the
main
branch only" else you will only be able to use the development version.
[!IMPORTANT] It is mandatory to follow the following steps to ensure that a stable version is deployed. If you want to deploy the development version, you can do so by selecting the
main
branch in the workflow.
Create following secrets in your forked repository: (Settings > Secrets and variables > New Repository Secret)
CF_API_TOKEN
- Your Cloudflare® API TokenCF_KV_ID
- Your Cloudflare KV Namespace ID
SHORT_API_KEY
- Recommended: A random string if you want to secure your API.Activate GitHub Actions in your repository.
Actions
tab in your repository.I understand my workflows, go ahead and enable them
to enable GitHub Actions.Run the workflow 🚀 Deploy
.
Actions
tab.🚀 Deploy
workflow on the left side.Run workflow
button on the right side.
Branch: main
dropdown.production
.Run workflow
button.(Recommended) Install the pull app to the repository. It will automatically update the production branch. Just install it and you are done, everything is preconfigured and will be updated automatically.
Short provides a simple API to create and manage new links. The API is secured by an API key which you can set in the secrets of your repository.
For detailed documentation, please refer to the API Documentation
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Joshua Schmitt - @jqshuv - [email protected]
Project Link: https://github.com/jqshuv/short
Me and this project are not affiliated with Cloudflare, Inc. or GitHub, Inc. in any way. The use of the trademarks is only for identification and explanation purposes. The use of the trademarks does not imply any endorsement by the trademark owners. If you have any questions or concerns, please contact me at [email protected]. I do not claim any ownership of the trademarks. All rights belong to their respective owners. Thank you for your understanding.