This is a template for building Cloudflare Pages applications using ClojureScript.
Live demo: https://clojurescript-cloudflare-pages.pages.dev
Follow these steps to deploy your own copy:
-
Fork this repository to your GitHub account.
-
Open it up on GitHub Codespaces (or locally) for development.
-
Run
npm build
to compile the ClojureScript code. -
Run
npm start
to serve the application locally. -
Run
npx wrangler login
and follow these instructions -
Run
npm run deploy
to deploy the application to your CloudFlare account.
Notes:
-
For local development, make sure you have Node.js, Java, and JDK installed
-
npm start
automatically recompiles the code when a file is changed insrc
-
This template generates a
_workers.js
file for the CloudFlare pages application -
This template uses ClojureScript on the server, not in the browser
-
Automated deployments are not supported as Cloudflare's build envirnoment can't compile ClojureScript
-
Install the Calva VS Code Extension for ClojureSript syntax highlighting, code formatting, and more..
Please open an issue to report bugs and submit a PR to contribute improvements!