Skip to content

An example of using Remix with Cloudflare D1 and Drizzle ORM, hosted on Cloudflare Pages

License

Notifications You must be signed in to change notification settings

uerkw/cf-remix-cms

 
 

Repository files navigation

Cloudflare D1, Remix, and Drizzle

This repo is an example for using Cloudflare D1, Remix, and Drizzle together. You can see a live demo here.

Development

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!

Deployment

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.

Initialization

  1. npm install
  2. npm run d1:new
  3. Add the newly created D1 database UUID to wrangler.toml
  4. npm run d1:init

With the D1 database initialised on Cloudflare, and configured in your wrangler.toml, you can also develop on a local d1 database (after running the above steps):

  1. npm run local:d1:init
  2. npm run dev

Deploy to Cloudflare Workers

About

An example of using Remix with Cloudflare D1 and Drizzle ORM, hosted on Cloudflare Pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.5%
  • JavaScript 7.5%