Inspired by theller's template https://github.com/thheller/next-cljs
This is a great project to explore clojure's datacentric approach against nextjs's file based routing. The way it works, cljs lays in generating the static files and nextjs serves them.
Minimal example showing how shadow-cljs could be used together with next.js to create static sites in CLJS.
nextjs
is a directory used by next
, all .js
files will be generated by shadow-cljs.
npm install
npx shadow-cljs watch nextjs
# or
npx shadow-cljs release nextjs
cd site
npm install
npx next
# or
npx next build && npx next start
open http://localhost:3000