Creating a new project
Creating your own instance of R2 Explorer is easy, after making sure you have Node installed, run this tool that will help you get started:
Step 1: select the name¶
You will be greeted with the creation tool, in the first prompt enter the name you want for your application, This name will also be used to deploy the application later into your Cloudflare account.
using create-r2-explorer version 1.0.0
╭ Create an application with Cloudflare Step 1 of 3
│
╰ In which directory do you want to create your application? also used as application name
./my-r2-explorer
Note
You can hit enter to continue with the default name my-r2-explorer
.
Step 2: install dependencies¶
This step is completely automated, the creation tool with copy the required files for you application and install all the dependencies.
╭ Installing dependencies Step 2 of 3
│
├ Installing dependencies
│ installed via `npm install`
│
╰ Dependencies Installed
Step 3: deploy the application¶
After installing everything, the creation tool will ask you if you want to deploy now.
If you select no, you will have to manually deploy it later, read more here.
Otherwise, if you select yes, the tool with proceed to deploy the application.
╭ Deploy with Cloudflare Step 3 of 3
│
├ Do you want to deploy your application?
│ yes deploy via `npm run deploy`
│
├ Logging into Cloudflare checking authentication status
│ not logged in
│
├ Logging into Cloudflare This will open a browser window
│ allowed via `wrangler login`
│
├ Selecting Cloudflare account retrieving accounts
│ account G4brym
│
├ Deploying your application
│ deployed via `npm run deploy`
│
├ SUCCESS View your deployed application at https://my-r2-explorer.g4brym.workers.dev
│
│ Navigate to the new directory cd my-r2-explorer
│ Run the development server npm run start
│ Deploy your application npm run deploy
│ Read the documentation https://developers.cloudflare.com/workers
│ Stuck? Join us at https://discord.gg/cloudflaredev
│
├ Waiting for DNS to propagate
│ DNS propagation complete.
│
├ Waiting for deployment to become available
│ deployment is ready at: https://my-r2-explorer.g4brym.workers.dev
│
├ Opening browser
│
╰ See you again soon!
Note
Login is completly handled by wrangler
and your authentication details never leave your local machine!
Feel free to inspect the creation tool code on github
Manually creating the project¶
If you preffer to do the things yourself, there is a project template available on github here, that you can use.