This is Turborepo boilerplate for Remix on Cloudflare workers with DO + Session KV
- Remix
- Turborepo
- Cloudflare Workers
- Durable Objects
- Wokers KV
- Tailwind CSS
- ESLint
- Prettier
- Playwright
$ npm install
$ yarn install
$ cd packages/worker
$ wrangler secret put SESSION_SECRET
$ wrangler kv:namespace create "SESSION_KV"
$ wrangler kv:namespace create --preview "SESSION_KV"
- Append kv's id and preview_id to
packages/worker/wrangler.toml
.
- Append account_id to
packages/worker/wrangler.toml
. - Append Cloudflare API Token to GitHub Actions Secrets(
CF_API_TOKEN
).
$ yarn build // only first time
$ yarn dev
$ yarn workspace remix-app add tiny-invariant
$ yarn add -W tiny-invariant
$ yarn deploy
Turborepo can use a technique known as Remote Caching (Beta) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching (Beta) you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
npx turbo link