Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akashrajpurohit/easy-gif
πΊπΌ Effortlessly Find and Share Gifs on the Fly!
https://github.com/akashrajpurohit/easy-gif
cloudflare-workers easy-gif gif honojs tenor-api
Last synced: about 2 months ago
JSON representation
πΊπΌ Effortlessly Find and Share Gifs on the Fly!
- Host: GitHub
- URL: https://github.com/akashrajpurohit/easy-gif
- Owner: AkashRajpurohit
- License: mit
- Created: 2023-02-25T07:25:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T18:39:12.000Z (8 months ago)
- Last Synced: 2024-10-04T22:11:12.378Z (3 months ago)
- Topics: cloudflare-workers, easy-gif, gif, honojs, tenor-api
- Language: TypeScript
- Homepage:
- Size: 5.77 MB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Easy GIF!
Effortlessly Find and Share Gifs on the Fly!
Bug report
Β·
Feature request
# Motivation πͺ
Simple utility service which helps me save ~5 seconds for every time I want to send a GIF to communicate with someone.
> These numbers adds up pretty quickly if you are a heavy GIF user as well. π
It uses Tenor GIF API to fetch the relevant GIF based on text search and returns the GIF image directly as the API response (not the URL).
![Preview](preview.gif)
You can self host it easily using Cloudflare Workers, see [deployment](#deployment-%EF%B8%8F) section below for more details.
# Endpoint π
- `${HOST_URL}/${my awesome text}` -> pass the text in URL format after slash.
For example -> `https://example.com/bongo-cat`. Replace `example.com` with whatever your self hosted worker host name is.
# Deployment βοΈ
Self hosting this is pretty straight forward, there are two ways.
The simplest way is to use the "Deploy with Workers" button and deploy the current version of service on your Cloudflare account.
[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/AkashRajpurohit/easy-gif)
Another way is to [fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) under your own Github account which will run the `deploy-to-cf` Github action workflow.
This workflow requires some environment variables so make sure add those
## Github Actions
Add these to the forked repository [github actions variables](https://docs.github.com/en/actions/learn-github-actions/variables).
- `CF_API_TOKEN` -> This is your Cloudflare API token which has permissions for Worker scripts.
Add the API tokens from [here](https://dash.cloudflare.com/profile/api-tokens)
- `CF_ACCOUNT_ID` -> This would be your Cloudflare Account ID.## Cloudflare Worker
- `TENOR_API_KEY` - Get your tenor API key from [here](https://tenor.com/gifapi/documentation#quickstart) and save it on the worker environment one it is created.
Once these are added, run the workflow and you should see the service being deployed on Cloudflare workers.
Take the worker URL and start sending GIFs π
# Technology Stack π»
- Framework - [Hono](https://honojs.dev/)
- Deployment - [Cloudflare Workers](https://workers.cloudflare.com/)
- GIF Service - [Tenor](https://tenor.com/)# Bugs or Requests π
If you encounter any problems feel free to open an [issue](https://github.com/AkashRajpurohit/easy-gif/issues/new?template=bug_report.md). If you feel the project is missing a feature, please raise a [ticket](https://github.com/AkashRajpurohit/easy-gif/issues/new?template=feature_request.md) on GitHub and I'll look into it. Pull requests are also welcome.
# Where to find me? π
[![Website Badge](https://img.shields.io/badge/-akashrajpurohit.com-3b5998?logo=google-chrome&logoColor=white)](https://akashrajpurohit.com/)
[![Twitter Badge](https://img.shields.io/badge/-@akashwhocodes-00acee?logo=Twitter&logoColor=white)](https://twitter.com/AkashWhoCodes)
[![Linkedin Badge](https://img.shields.io/badge/-@AkashRajpurohit-0e76a8?logo=Linkedin&logoColor=white)](https://linkedin.com/in/AkashRajpurohit)
[![Instagram Badge](https://img.shields.io/badge/[email protected]?logo=Instagram&logoColor=white)](https://instagram.com/akashwho.codes/)
[![Telegram Badge](https://img.shields.io/badge/-@AkashRajpurohit-0088cc?logo=Telegram&logoColor=white)](https://t.me/AkashRajpurohit)