📖 See the Remix docs and the Remix Vite docs for details on supported features.
npx create-remix@latest --template https://github.com/dodycode/remix-nextui-cloudflare
This template comes with a few hooks to help you get started.
This template has a built in API wrapper that you can use to fetch data from your API in your loader functions or actions.
importapiClientfrom"~/utils/api";exportconstloader=async({ request })=>{constdata=awaitapiClient.get("/api/data");returnjson(data);};Generate types for your Cloudflare bindings in wrangler.toml:
npm run typegenYou will need to rerun typegen whenever you make changes to wrangler.toml.
Run the Vite dev server:
npm run devTo run Wrangler:
npm run build
npm run startWarning
Cloudflare does not use wrangler.toml to configure deployment bindings.
You MUSTconfigure deployment bindings manually in the Cloudflare dashboard.
First, build your app for production:
npm run buildThen, deploy your app to Cloudflare Pages:
npm run deploy