Manual
1. Clone the project
You can also clone the project using git command but degit allow you to only retrieve the necessary parts
2. Install dependencies
After cloning the project you will need to install dependencies project using your favorite package manager
This project use pnpm as it dependencies manager
3. Configure project
In order to configure the project you will need to edit the wrangler.toml file
Configure your R2 bucket
Go to your Cloudflare Dashboard and create a new R2 bucket.
Copy the name of your bucket and edit your wrangler.toml file
Configure your D1 database
Go to your Cloudflare Dashboard and create a new D1 database. Copy the id and the name of your d1 database
4. Deploy your npflared worker
Once everything is set-up you can deploy your worker.
5. Run initial migrations
Once your worker is deployed you have to run initial database migrations
6. Create your admin token
In order to distribute tokens for other users, you will need to create an initial token with elevated privileges
You can generate any kind of random values
Run the following command after replacing ADMIN_TOKEN with your desired token
And we are done 🎉