Redox
Developer | API Keys | Create API Key
Name: mw
Key pairs | Generate your keys | Generate New API Keys
Download json public and private keys (JWK), postman env
Developer | Endpoints | Create Endpoint
Name: local
Redox API Endpoint: [cloudflare tunnel to localhost from tunnel script in package.json]
Verification Token: [REDOX_ENDPOINT_VERIFICATION_TOKEN env var]
Verification Method: POST
D1
https://developers.cloudflare.com/pages/platform/functions/bindings/#d1-databases
Workers & Pages | D1 | Create database | Dashboard
Workers & Pages | Settings | Functions | D1 database bindings | Production | Add binding
pnpm wrangler d1 execute rcf_db --file=./d1/schema.sql --local
pnpm wrangler d1 execute rcf_db --command='select * from users' --local
pnpm wrangler d1 execute rcf_db --command='pragma table_list' --local
pnpm wrangler d1 execute rcf_db --command='pragma table_info(users)' --local
pnpm wrangler d1 execute rcf_db --command='pragma table_info(d1_migrations)' --local
pnpm wrangler d1 execute rcf_db --command='select name, sql from sqlite_master' --local
pnpm wrangler d1 execute rcf_db --command='select * from d1_migrations' --local
pnpm wrangler d1 migrations list rcf_db --local
pnpm wrangler d1 migrations apply rcf_db --local
pnpm script scripts/chat.ts
pnpm tsx --env-file=.dev.vars scripts/chat.ts
You will be utilizing Wrangler for local development to emulate the Cloudflare runtime. This is already wired up in your package.json as the dev
script:
# start the remix dev server and wrangler
npm run dev
Open up http://127.0.0.1:8788 and you should be ready to go!
Cloudflare Pages are currently only deployable through their Git provider integrations.
If you don't already have an account, then create a Cloudflare account here and after verifying your email address with Cloudflare, go to your dashboard and follow the Cloudflare Pages deployment guide.
Configure the "Build command" should be set to npm run build
, and the "Build output directory" should be set to public
.