Deployment Guide

Deploy to
Cloudflare Pages

Step-by-step guide to publish your Habit Tracker website using Wrangler CLI. Goes live on a pages.dev URL in under 2 minutes.

APK file size note: Cloudflare Pages has a 25 MB per-file limit. If your app-arm64-v8a-release.apk exceeds 25 MB, you'll need to host it separately (e.g. GitHub Releases, Google Drive) and update the download link in index.html.

1 Install Node.js

Wrangler requires Node.js 18 or newer. Download it from nodejs.org and run the installer. Verify in your terminal:

TerminalPowerShell / CMD
node --version
# Should print v18.x.x or higher

npm --version
# Should print 9.x.x or higher

2 Install Wrangler

Install the Cloudflare Wrangler CLI globally using npm:

TerminalInstall
npm install -g wrangler

Confirm it installed correctly:

TerminalVerify
wrangler --version
# Should print: ⛅️ wrangler 3.x.x

3 Log in to Cloudflare

This opens your browser and asks you to authorize Wrangler with your Cloudflare account. Create a free account at dash.cloudflare.com if you don't have one.

TerminalAuthentication
wrangler login
A browser tab will open. Click Allow to grant Wrangler access to your Cloudflare account. Once done, the terminal will confirm you're logged in.

4 Navigate to your project folder

Open a terminal and change directory to your website folder:

TerminalPowerShell
cd "C:\Users\visha\Desktop\webapp\habit website"

5 Deploy to Cloudflare Pages

Run the deploy command. The . means "deploy the current directory". Your site gets a free .pages.dev URL.

TerminalDeploy
wrangler pages deploy . --project-name habit-tracker
First deploy: Wrangler will ask you to create the project — press Enter to confirm.

Subsequent deploys: Just run the same command again — it updates instantly.

Live URL: You'll get a URL like habit-tracker.pages.dev printed in the terminal.

Alternative: Deploy via GitHub (recommended for ongoing updates)

Connect a GitHub repo to Cloudflare Pages for automatic deploys on every push — no terminal needed after setup.

1Push your website folder to a GitHub repository.
2Go to dash.cloudflare.com → Pages → Create a project → Connect to Git.
3Select your repository. Set Build output directory to / (root) and leave build command blank.
4Click Save and Deploy. Every future git push auto-deploys your site.

You're live.

Your Habit Tracker website is now deployed globally on Cloudflare's edge network — fast, free, and always on.

Back to website