From d09d2934a30056f52e8beb5c17c2ebe06c54c327 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Mon, 24 Feb 2025 20:33:51 -0500 Subject: [PATCH] Setup .env.example --- .env.example | 17 +++++++++++++++++ README.md | 29 +++++------------------------ 2 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..77c617d --- /dev/null +++ b/.env.example @@ -0,0 +1,17 @@ +# Slack +SLACK_BOT_TOKEN=xoxb- # From OAuth & Permissions +SLACK_SIGNING_SECRET= # From Basic Information +SLACK_APP_TOKEN=xapp- # From Basic Information (for Socket Mode) +SLACK_CHANNEL_ID=channel-id # Channel where bot operates + +# S3 Config CF in this example +AWS_ACCESS_KEY_ID=1234567890abcdef +AWS_SECRET_ACCESS_KEY=abcdef1234567890 +AWS_BUCKET_NAME=my-cdn-bucket +AWS_REGION=auto +AWS_ENDPOINT=https://.r2.cloudflarestorage.com +AWS_CDN_URL=https://cdn.beans.com + +# API +API_TOKEN=beans # Set a secure random string +PORT=3000 \ No newline at end of file diff --git a/README.md b/README.md index 1a6e014..b136e0b 100644 --- a/README.md +++ b/README.md @@ -77,26 +77,7 @@ This CDN supports any S3-compatible storage service. Here's how to set it up usi ### 3. Environment Setup -Create a `.env` file with: -```env -# Slack -SLACK_BOT_TOKEN=xoxb- # From OAuth & Permissions -SLACK_SIGNING_SECRET= # From Basic Information -SLACK_APP_TOKEN=xapp- # From Basic Information (for Socket Mode) -SLACK_CHANNEL_ID=channel-id # Channel where bot operates - -# S3 Config CF in this example -AWS_ACCESS_KEY_ID=1234567890abcdef -AWS_SECRET_ACCESS_KEY=abcdef1234567890 -AWS_BUCKET_NAME=my-cdn-bucket -AWS_REGION=auto -AWS_ENDPOINT=https://.r2.cloudflarestorage.com -AWS_CDN_URL=https://cdn.beans.com - -# API -API_TOKEN=beans # Set a secure random string -PORT=3000 -``` +Check out the `example.env` file for getting started! ### **4. Installation & Running** @@ -145,7 +126,7 @@ pm2 startup ### V3 API (Latest) Version 3 -**Endpoint:** `POST https://e2.example.hackclub.app/api/v3/new` +**Endpoint:** `POST https://cdn.hackclub.com/api/v3/new` **Headers:** ``` @@ -155,7 +136,7 @@ Content-Type: application/json **Request Example:** ```bash -curl --location 'https://e2.example.hackclub.app/api/v3/new' \ +curl --location 'https://cdn.hackclub.com/api/v3/new' \ --header 'Authorization: Bearer beans' \ --header 'Content-Type: application/json' \ --data '[ @@ -203,7 +184,7 @@ curl --location 'https://e2.example.hackclub.app/api/v3/new' \ Version 2 -**Endpoint:** `POST https://e2.example.hackclub.app/api/v2/new` +**Endpoint:** `POST https://cdn.hackclub.com/api/v2/new` **Headers:** ``` @@ -235,7 +216,7 @@ Content-Type: application/json Version 1 -**Endpoint:** `POST https://e2.example.hackclub.app/api/v1/new` +**Endpoint:** `POST https://cdn.hackclub.com/api/v1/new` **Headers:** ```