Share files using Cloudflare Workers and GitHub Private Repositories!
- Clone this repository
- Create a new GitHub Personal Access Token with the
repo
scope - Create a private repository to store your files
- Make sure you have
npm
andwrangler
installed and configured - Create a new D1 Database by running
wrangler d1 create file-share-data
- Update file
wrangler.toml
:
name = "file-share"
main = "Source/index.ts"
compatibility_date = "2023-10-02"
[[d1_databases]]
binding = "FileShareBufferDatabase"
database_name = "file-share-data"
database_id = "..." // The ID of the database you created, output in step 5
- Run
npm install
to install dependencies - Run
wrangler deploy
to publish your project - Run
wrangler secret put GithubPAT
,wrangler secret put GithubOwner
andwrangler secret put GithubRepo
to store your GitHub Personal Access Token, GitHub Owner and GitHub Repository - Your file share is now live! 🎉
This project is licensed under the terms of the GNU General Public License v3.0.