Skip to content

Chooks22/cloudflare-gg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudflare-gg

A project to generate vanity links to discord invites using Cloudflare Workers.

Prerequisites

This project requires Bun to be installed. You also need a free Cloudflare account to deploy to.

Setup

To use, clone and install the project:

$ git clone https://github.com/Chooks22/cloudflare-gg
$ cd cloudflare-gg
$ bun i

Setup wrangler and update the wrangler.toml file to suit your own deployment.

Then deploy your project using:

$ bun run deploy

How-to

Create your first vanity url

Create a key to generate urls:

$ bun generate-key

Open up the .env file and update API_URL to your current deployment:

API_KEY="..."
API_URL="https://your-deployment.workers.dev"

Generate your first vanity url using:

$ bun create-invite gamers hrgUh5kFns

A new vanity url https://your-deployment.workers.dev/gamers has been generated and should now redirect you to https://discord.com/invite/hrgUh5kFns.

Creating a vanity url

$ bun create-invite <invite-key> <invite-code>

List existing api keys

$ bun list-keys